Fastest way to find total count
Hey Guys,
I was just wondering which way you feel is the best to find the total rows from a table.
This is what I usually use:
$query = mysql_query("SELECT `id` FROM `table`");
$total = mysql_num_rows($query);
Thing is when it brings out over a 1000 rows I would think there would be a faster way to do this.
Any feedback on this would be great. Thanks!
Edited 1 time(s). Last edit at 02/08/2006 07:39AM by natio struction.
Subject
Written By
Posted
Fastest way to find total count
February 08, 2006 07:39AM
February 08, 2006 09:30AM
February 09, 2006 12:29AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.