aaricwon Posted February 24, 2008 Share Posted February 24, 2008 I have a database where it is very simple. Just people signing up. I would like to have displayed on my page: " ### People have signed up" and for the ### to increase every time another person signs up... Quote Link to comment Share on other sites More sharing options...
drisate Posted February 24, 2008 Share Posted February 24, 2008 <?php echo "We have "; echo @current(@mysql_fetch_assoc(@mysql_query("SELECT count(id) FROM accounts "))); echo " regestred members!"; ?> Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted February 24, 2008 Share Posted February 24, 2008 <?php $query = mysql_query("SELECT COUNT(*) FROM table")or die(mysql_error()); $num = mysql_num_rows($query); echo "$num People have signed up"; ?> Quote Link to comment Share on other sites More sharing options...
drisate Posted February 24, 2008 Share Posted February 24, 2008 Yeah pocobueno1388's version will be executed faster then my super lazy querry lol Quote Link to comment Share on other sites More sharing options...
aaricwon Posted February 24, 2008 Author Share Posted February 24, 2008 THANKS!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.