View Full Version : count function for site
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.
03-25-2003, 10:59 PM
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
$result = mysql_query("SELECT count(id) FROM members_table", $link);
$num_rows = mysql_num_rows($result);
echo "You have ".$num_rows." members\n";
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?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.