Reply to Re: PDO::prepare and SELECT WHERE LIKE

Your name:

Reply:


Posted by amygdala on 12/17/87 11:56

"Alvaro G. Vicario" <webmaster@NOSPAMdemogracia.com> schreef in bericht
news:126sz4gieil98.1cjfemt8ve9pj$.dlg@40tude.net...
> *** amygdala escribiσ/wrote (Wed, 23 Aug 2006 22:28:26 +0200):
>> $sql = 'SELECT name FROM ' . DB_TABLE_CITY . ' WHERE country_id =
>> :countryId
>> AND name LIKE ":city%" LIMIT 10';
>
> I've never used PDO but it seems you are using double quotes as string
> separator in SQL, and that's not correct. All SQL dialects I know use
> single quotes.
>

No, sorry, that's not it. Double quotes work fine with mysql on my system
(wamp). I tried single quotes too though (escaped in this case of course).

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация