View Full Version : count function for site
megamailfortune
03-25-2003, 10:37 PM
I need to know if anyone knows a member count code to be displayed via PHP, I am storing all membership info in a database, Need a count function on my table and get the number of records.
Thanks
Nightfire
03-25-2003, 10:59 PM
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT count(id) FROM members_table", $link);
$num_rows = mysql_num_rows($result);
echo "You have ".$num_rows." members\n";
megamailfortune
03-26-2003, 12:00 AM
Thank you for the info:o
Now to put this on table what file would I insert this code?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.