RE: [PHP] OK SQL experts...
| From: | Jay Blanchard | Date: | Fri, 23 Apr 2004 16:00:28 +0000 |
| Subject: | RE: [PHP] OK SQL experts... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-184420@lists.php.net to get a copy of this message | ||
[snip]
SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%') AND status =
'active';
if that works continue until you get an error.
[/snip]
That'll give you an error right there. That old single quoted variable
will get you every time. :)
WHERE (field_1 LIKE '%$keyword%')
WHERE (field_1 LIKE '%" . $keyword . "%')