Try to use this query:
$query=mysql_ query("select * from (select * from newsa ORDER BY id DESC LIMIT
3) TMP_RES Order By TMP_RES.id ASC");
With Regards,
Krishna
----- Original Message ----
From: Tedit kap <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, 4 May, 2008 6:11:38 AM
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=Ahu06i62sR 8HDtDypao8Wcj9tA cJ
[Non-text portions of this message have been removed]
From Chandigarh to Chennai - find friends all over India. Go to
http://in.promos.yahoo.com/groups/citygroups/
[Non-text portions of this message have been removed]