Query syntax error?
| From: | Harvey | Date: | Thu, 13 Jan 2011 14:33:10 +0000 |
| Subject: | Query syntax error? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47629@lists.php.net to get a copy of this message | ||
Hello,
I have a query on a page that used to work fine, but is now generating an
error.
I assume that the version of php or mysql was updated on the webhost server
or something like that?
Here is the query:
select count(places_data.place_id) as areacount, boroughs.borough_name as
boroname, area.area_name as areaname, area.area_id as areaid
from places_data a
inner join boroughs b on a.area_fid = b.area_id
inner join area c on c.borough_fid = b.borough_id
where places_data.on_off_fid = 2
" . $cat_query . "
group by c.area_name
order by b.borough_name ASC, c.area_name ASC
And here is the error message:
Unknown column 'places_data.place_id' in 'field list'
But place_id is a field in places_data table.
Any ideas?
Thanks!
Harvey