If i understood right, you want to list a sequence of numbers and follow some data like: 1 - data of number 1 2 - data of number 2 ... If it's right, you can do it. $query="SELECT * FROM db ORDER BY numbers DESC limit 1"; $maxnum=$numbers; for ($num=1;$num<=$maxnum; $num++) { $query="SELECT * FROM db where numbers=".$num; echo $num." - ".$data."<br>"; } ""Rob W."" <rob@xxxxxxxxxxxxxxx> escreveu na mensagem news:00aa01c69336$4c12dee0$f31f10ac@xxxxxx I got the previous question answered, Now here's my next problem. With the numbers displaying correctly again I got: 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 25 listed in that order in the database Now i'm trying to figure out how to write a syntax saying that if like number 8 isnt listed, display it. I've tried doing a if ($count != $data) { echo "$data"; } $count++; But when I get to like id number 9 it dont work right because the next entrie is displayed as 10 in the db. So that's my problem is to try and display only them numbers that are not in there. I have also tried putting the numbers in to an array and matching from there but it still come's up as the same as above. - Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php