hanwei Posted January 10, 2007 Share Posted January 10, 2007 hi, i have a small question.i have created a table to be displayed in my php script. The data displayed is from my mySQL database. I do a select * to display all the result on my table. And my table looks like this:--------------------------------1. AAA xxx xxx xxx2. BBB xxx xxx xxx3. CCC xxx xxx xxx4. DDD xxx xxx xxx5. EEE xxx xxx xxx--------------------------------The numbering is from the smallest to the largest. So i would like to know is there any method to make the numbering from the largest to the smallest?? Because whenever a data is inserted to my database, the number will automatically increase, so i would like to display the recent data that have been created. Can anyone teach me how to do it??e.g---------------------------------5. EEE xxx xxx xxx4. DDD xxx xxx xxx3. CCC xxx xxx xxx2. BBB xxx xxx xxx1. AAA xxx xxx xxx--------------------------------thanks in advance..:D Link to comment https://forums.phpfreaks.com/topic/33590-about-displaying/ Share on other sites More sharing options...
HuggieBear Posted January 10, 2007 Share Posted January 10, 2007 Just use an ORDER BY clause in your sql statement...[code]SELECT column_name FROM table_name ORDER BY numeric_column DESC[/code]RegardsHuggie Link to comment https://forums.phpfreaks.com/topic/33590-about-displaying/#findComment-157357 Share on other sites More sharing options...
hanwei Posted January 10, 2007 Author Share Posted January 10, 2007 thanks alot :D.. i'll try tomorrow.. Link to comment https://forums.phpfreaks.com/topic/33590-about-displaying/#findComment-157360 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.