Count Records Returned MySQL Doctrine

Posted by 01010011 on Stack Overflow See other posts from Stack Overflow or by 01010011
Published on 2010-04-27T02:51:27Z Indexed on 2010/04/27 2:53 UTC
Read the original article Hit count: 338

Filed under:
|
|

Hi,

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(); 

© Stack Overflow or respective owner

Related posts about doctrine

Related posts about mysql