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
Use aggregate function. Try the below SQL Command
$num= mysql_query("SELECT COUNT(id) FROM $table");