Jump to content


Photo

Help! Showing number of.....


  • Please log in to reply
2 replies to this topic

#1 HaZaRd420

HaZaRd420
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 24 April 2006 - 01:20 AM

Hello, I want to know how would i code to see the number of ID's inside of the database, For example... I have a roster with 8 people, I want it to say at the very top, We have currently 8 members, Will this work from going from the ID or? Please help me kthnkx.

#2 bbaker

bbaker
  • Members
  • PipPipPip
  • Advanced Member
  • 127 posts
  • LocationNY

Posted 24 April 2006 - 02:43 AM

$query = "SELECT * FROM table";
$result = mysql_query($query) or die (mysql_error()."<br />Couldn't execute query: $query");
$num_results = mysql_num_rows($result);

echo "We currently have $num_results members";


#3 HaZaRd420

HaZaRd420
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 24 April 2006 - 04:27 AM

Thanks alot man. Worked.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users