hi guys,
i've always been curious if there is an optimal way to do this.
1st way
$sql='select count(id) as num_rows from items';
$result=mysql_query($sql, $link_id);
$record=fetch_object($result);
$num_rows=$record->num_rows;
2nd way
$sql='select id from items';
$result=mysql_query($sql, $link_id);
$num_rows=myql_num_rows($result);
which is the fastest/best way to do this?
thanx,
-paul
http://xhawk.net