dzhax Posted August 18, 2009 Share Posted August 18, 2009 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 More sharing options...
dzhax Posted August 18, 2009 Author Share Posted August 18, 2009 nvm found itmysql_num_rows($online); Link to comment Share on other sites More sharing options...
Ingolme Posted August 18, 2009 Share Posted August 18, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.