how to get number of rows in Joomla mysql quey

Links for php scripts

Moderators: macek, egami, gesf

phpkiller
New php-forum User
New php-forum User
Posts: 31
Joined: Thu Jun 28, 2012 2:11 pm

how to get number of rows in Joomla mysql quey

Postby phpkiller » Wed Oct 23, 2013 10:54 pm

$db = &JFactory::getDBO();
$checkQuery = "SELECT * FROM table";
$db->setQuery($checkQuery);
//$rowsAG = $db->getNumRows();
$check = $db->query();

print_r($check->num_rows);

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest