Jump to content

Echoing The Amount Of Rows In A Table?


dzhax

Recommended Posts

im using this select to try and get the number of rows in a table$online = mysql_query("SELECT count(*) FROM playersonline",$con);what would i then type to echo the number of rows to the screen?

Link to comment
Share on other sites

Or you could access the result given by the query:

$online = mysql_query("SELECT count(*) FROM playersonline",$con);$result = mysql_fetch_row($online);echo $result[0];

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...