user4fun Posted June 18, 2007 Share Posted June 18, 2007 Counting the number of recrods in a table caled ocnfirmed $q2 = mysql_query("SELECT COUNT(*) FROM confirmed"); echo $q2; i dont think it is working, but when it does i want to to sayJoin the group of $q2 people.thanks for any help you can give Link to comment Share on other sites More sharing options...
justsomeguy Posted June 18, 2007 Share Posted June 18, 2007 The return value of mysql_query is a database result object, not a field value. $q2 = mysql_query("SELECT COUNT(*) FROM confirmed"); $row = mysql_fetch_array($q2);echo $row[0]; $q2 = mysql_query("SELECT COUNT(*) AS num FROM confirmed"); $row = mysql_fetch_assoc($q2);echo $row['num']; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.