[PHP-DB] Query syntax error?

2011-01-13 Thread Harvey
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,

Re: [PHP-DB] Query syntax error?

2011-01-13 Thread jose
you have renamed places_data table to 'a' 2011/1/13 Harvey har...@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:

RE: [PHP-DB] Query syntax error?

2011-01-13 Thread Harvey
Thanks, I got it working now, had to use the a/b/c thing a few times -Original Message- From: jose [mailto:jojap...@gmail.com] Sent: Thursday, January 13, 2011 9:52 AM Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Query syntax error? you have renamed places_data table to 'a' 2011/1

[PHP-DB] Query syntax

2007-09-15 Thread ron.php
$query=SELECT * FROM table WHERE listing_type LIKE '%$listing_type%' AND listing_approved = '1' OR listing_approved = '2' ORDER BY name ASC; My question is how can I search for records where listing_approved has a value of either 1 or 2 (while in the same search I am searching for

Re: [PHP-DB] Query syntax

2007-09-15 Thread TG
%' AND listing_approved IN ('1', '2') ORDER BY name ASC Good luck! -TG - Original Message - From: ron.php [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sat, 15 Sep 2007 15:04:59 -0400 Subject: [PHP-DB] Query syntax $query=SELECT * FROM table WHERE listing_type LIKE '%$listing_type