How do you get the number of records returned by a query?
pdjohnson - March 9, 2007 - 16:40
Simple enough question I guess but what is the best way to get the number of records returned by the likes of $queryResult = db_query($query); ????
Simple enough question I guess but what is the best way to get the number of records returned by the likes of $queryResult = db_query($query); ????
Answer
I worked it out.
$queryResult = db_query($query);
$cnt = db_num_rows($queryResult);