$bilgi= mysql_query("SELECT age,wname,slid,sex FROM user AND city WHERE user.ci_name=(SELECT ci_id FROM city WHERE ci_name='$ciname')");
while($sutun= mysql_fetch_array($bilgi))
This is my statement of query. This gives me error and the error is supplied argument is not valid MySQL result in resource in ....
Now let me explain what I am doing. I am sending some city name to my database in order to find the unique number of the city. I send Istanbul and it's id is 2 in my database. I have 2 tables, 1 is city the other one is user. User table has age,wname,sex,slid; and ci_name part that is foreign key with the city_id. city_id is the primary key of the city table. I want to find the age, wname, slid and sex of Istanbul.
Can anyone help me how can I get throw with this error and find what I want :)?