Re: SELECT LIKE with "%" and without "%"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$sql = "SELECT * FROM table WHERE ID ='$_GET[id]' AND title LIKE
'%$_GET[word]%'";



-------- Original Message  --------
Subject:  SELECT LIKE with "%'" and without "%'"
From: Emiliano Boragina <emiliano.boragina@xxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Date: 05/03/2009 01:43 AM
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

+                                                                          _
   // Emiliano Boragina _
   // Diseño & Comunicación //////////////////
+                                                                          _
   // emiliano.boragina@xxxxxxxxx  /
   // 15 40 58 60 02 ///////////////////////////
+                                                                          _



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux