Faster way to know the tolal number of rows in Mysql Database?
- by Starx
If I need to know the total number of rows in a table of database I do something like
$query = "SELECT * FROM tablename WHERE link='1';";
$result = mysql_query($query);
$rows = mysql_fetch_array($result);
$count = count($rows);
So you see the total number of data is recovered scanning through entire database
Is there a better way