how can i show that total membership in my site...
means how many ppl have been registered.. and the number of registered users i want to display
for example
total memberships : 102
please can any one tell me the code how can i add this feature...
How Can I Show That Total Membership ?
Moderator: General Moderators
Code: Select all
SELECT COUNT(*) AS `count` FROM `users`- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
yes i m using mysql
here is the infoo
users table i creat in mysql
then i want to get the total membership then i write this code
still its not showing the total memberships
please tell me what shuld i do
here is the infoo
users table i creat in mysql
Code: Select all
CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
first_name varchar(25) NOT NULL default '',
last_name varchar(25) NOT NULL default '',
email_address varchar(255) NOT NULL default '',
username varchar(25) NOT NULL default '',
password varchar(255) NOT NULL default '',
info text NOT NULL,
signup_date datetime NOT NULL default '0000-00-00 00:00:00',
activated enum('0','1') default NULL,
decrypted_password varchar(255) NOT NULL default '',
PRIMARY KEY (userid),
UNIQUE KEY username (username)
) TYPE=MyISAM COMMENT='Mysiteinfo';Code: Select all
$results = mysql_query("select count(*) as userid from users");
$get_row = mysql_fetch_array($results); // get 1 row
$totalmembers = $get_row['userid'];
echo $totalmembers;still its not showing the total memberships
please tell me what shuld i do