Re: DataObjects find using LIKE operators
| From: | Markus Wolff | Date: | Mon, 13 Sep 2004 09:00:45 +0000 |
| Subject: | Re: DataObjects find using LIKE operators | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14515@lists.php.net to get a copy of this message | ||
Bastien Leblanc wrote:
Dear users, Is there a way to query the database using LIKE operators rather =, I would like user to be able to search with wildcard (* or % or what ever). How would you treat that problem?$do = DB_DataObject::factory('myTable'); $do->whereAdd("myField LIKE '%anything%'"); $do->find(); while($do->fetch()) {
echo "Found: ".$do->myField."<br>\n";} Regards, Markus