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