Posted by amygdala on 08/23/06 20:28
Hi,
I'm trying to get the following code to work:
$sql = 'SELECT name FROM ' . DB_TABLE_CITY . ' WHERE country_id = :countryId
AND name LIKE ":city%" LIMIT 10';
$sth = $dbh->prepare( $sql );
etc...
Using:
.... LIKE "' . $city . '%" ...
Works fine, but PDO doesn't seem to recognize the :city variable with the
trailing % sign. How can I make this work so PDO recognizes :city?
Thanks in advance!
Navigation:
[Reply to this message]
|