Jump to content

Archived

This topic is now archived and is closed to further replies.

HaZaRd420

Help! Showing number of.....

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[code]
$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";
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.