Couldn't you use something like
for ($i = mysql_num_rows() - 1; $i = 0; $i--) {
mysql_data_seek($i);
........
}
Charlie
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tedit kap
Sent: 04 May 2008 01:42
To: [email protected]
Subject: [php_mysql] DESC in mysql results
Hi all,
$query=mysql_query("select * from newsa ORDER BY id DESC LIMIT 3");
while ($row = mysql_fetch_array($query)) { echo"..............
if we say the id of rows goes from 1 to 100, so the last row's id is 100,
this code displays the results for the ids as follows:
row with id 98
row with id 99
row with id 100
The question is, I want it to display as :
row with id 100
row with id 99
row with id 98
How can I achieve this?
(if i try ASC instead of DESC it displays rows with ids 1,2,3 - that is not
what I want)
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[Non-text portions of this message have been removed]
------------------------------------
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning. Yahoo! Groups Links