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

[email protected] (Eleonora De Marinis)
Newsgroups php.db
Message-ID <[email protected]>
$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 <[email protected]>
To: [email protected]
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 //////////////////
> +                                                                          _
>    // [email protected]  /
>    // 15 40 58 60 02 ///////////////////////////
> +                                                                          _
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.