Re: Query syntax error?

From: Date: Thu, 13 Jan 2011 14:51:32 +0000
Subject: Re: Query syntax error?
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-47630@lists.php.net to get a copy of this message
you have renamed places_data table to 'a' 2011/1/13 Harvey <harvey@harveyk.com>: > 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 > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#47630) next »