PDA

View Full Version : Counting returned rows


MrEyes
06-16-2008, 01:50 PM
Are there any existing methods in the VB class to get a count of return rows.

As the moment my code iterates through each result and maintains a count using:


$sqlData = $db->query_read($sql);
$numrows = mysql_num_rows ( $sqlData );


However if VB has a wrapper for this method it would make sense to use that, for example


$rowcount = $db->row_count($sqlData))


EDIT: Found it:


$rowcount = $db->num_rows($sqlData))

Opserty
06-16-2008, 05:33 PM
<a href="http://members.vbulletin.com/api/" target="_blank">vBulletin 3.7 Code Documentation</a>

Contains a list of all classes (and their methods) as well as all functions defined in any vBulletin file.