I just started to use the Slim framework + NotORM_ and need to do the following:
SELECT * FROM Users WHERE name LIKE '%$value%'"
In Slim I can select the exactly matching rows using
$p = $db->Users()->where('name', $value) as $p)
I would appreciate if someone show me the right solution to my problem
You can provide the like keyword in your query with a wildcard, and add the % signs before and after your search term in PHP like this:
$p = $db->Users()->where('name like ?', "%$value%")
where_like('DataFieldName','%'Query'%')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With