How do I check the number of records returned from a search of my MySQL database with a statement like this:
$searchKey = 'Something to search for';
$searchResults = Doctrine::getTable('TableName')->createQuery('t')-
>where('columnName LIKE ?','%'.$searchKey.'%')->execute();
maybe
$searchResults->rowCount();
from here
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