Showing posts with label num of rows. Show all posts
Showing posts with label num of rows. Show all posts

Monday, November 05, 2012

Get number of rows in joomla


Simple to Count the number of rows in joomla.
getNumRows() function used to count the rows.

Example:

$db =& JFactory::getDBO();
$query  = "SELECT * from #__table";
$db->setQuery($query);
$db->query();
$count=$db->getNumRows();