Page 1 of 1

Re: Problem with mysql_fetch_array

Posted: Fri Aug 24, 2012 3:34 am
by freshnet
Your query is selecting a column called rests.name. You can't echo back a column that isn't in your results. You'd have to do something like

Code: Select all

SELECT region, rests.name, rests.zip FROM delivery_areas, rests WHERE city = 'Ciccagna' AND rest_id = rests.id");

Re: Problem with mysql_fetch_array

Posted: Fri Aug 24, 2012 11:22 pm
by NigelRen
When your accessing fields from mysql_fetch_array, you should have quotes around the field name, so it should be

Code: Select all

echo $search['rests.name'];