View Full Version : row count down

04-23-2012, 08:10 PM
i have this script that will count the number of rows witch is working but say if i had a number of 100 and i had 3 rows how can i make the number 100 count down so the number 100 now would be 97 etc.. and keep counting down to 0 as the number of rows increase thanks...

$result = mysql_query("SELECT * FROM users");
$num_rows = mysql_num_rows($result);
echo $num_rows;

04-24-2012, 01:44 PM
This can not be this simple, but I don't know what you mean by count down.

$num_rows = 3;
echo $num_rows.'<br />';
$new_num = 100 - $num_rows;
echo $new_num;