...

View Full Version : row count down



ycpc55
04-23-2012, 08:10 PM
hi
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...





include("db.php");
$result = mysql_query("SELECT * FROM users");
$num_rows = mysql_num_rows($result);
echo $num_rows;
?>

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum