note 87654 rejected from function.mysql-query by danbrown
| From: | danbrown@php.net | Date: | Mon, 15 Dec 2008 14:54:34 +0000 |
| Subject: | note 87654 rejected from function.mysql-query by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148170@lists.php.net to get a copy of this message | ||
Note Submitter: victor dot rendon dot rapp at gmail dot com
----
I have a problem extracting info from a db where the words starts with #. I want to find rows
matching # and then anything starting with the string $q. I have tried:
$sql = "SELECT pages_title FROM pages WHERE pages_title REGEXP
'^[#]".$q."%' ";
$sql = "SELECT pages_title FROM pages WHERE pages_title LIKE '#".$q."%'
";