[PHP-DB] SELECT LIKE with "%" and without "%"

2009-05-02 Thread Emiliano Boragina
Hello. I am using this: $sql = "SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'"; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? Thanks +      _    // Emil

Re: [PHP-DB] SELECT LIKE with "%" and without "%"

2009-05-02 Thread mrfroasty
Emiliano Boragina wrote: > Hello. > > I am using this: > $sql = "SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE > '%$_GET[word]%'"; > This doesnt work? $sql = "SELECT * FROM table WHERE ID='some_id' AND title='some_title'; -- Extra details: OSS:Gentoo Linux profile:x86 Hardw

Re: [PHP-DB] SELECT LIKE with "%" and without "%"

2009-05-04 Thread Eleonora De Marinis
$sql = "SELECT * FROM table WHERE ID ='$_GET[id]' AND title LIKE '%$_GET[word]%'"; Original Message ---- Subject: [PHP-DB] SELECT LIKE with "%'" and without "%'" From: Emiliano Boragina To: php-db@lists.php.net Date:

Re: [PHP-DB] SELECT LIKE with "%" and without "%"

2009-05-04 Thread Philip Thompson
On May 2, 2009, at 6:43 PM, Emiliano Boragina wrote: Hello. I am using this: $sql = "SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'"; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? PLEASE tell me your cleaning that inpu

Re: [PHP-DB] SELECT LIKE with "%" and without "%"

2010-02-24 Thread Ahmet Caner
"Eleonora De Marinis" , haber iletisinde sunlari yazdi:49fe92d0.2060...@garr.it... > $sql = "SELECT * FROM table WHERE ID ='$_GET[id]' AND title LIKE > '%$_GET[word]%'"; > > > > ---- Original Message > Subject: [PH