Whats the most efficient way of selecting total number of records from a large table? Currently, Im simply doing
$result = mysql_query(\"SELECT id FROM table
What about something like this:
$result = mysql_query("SELECT COUNT(id) AS total_things from table"); $row = mysql_fetch_array($result,MYSQL_ASSOC); $num_results = $row["total_things"];