Forums
 This topic is locked 
             Ordering Data from a mySQL table
 26 May 2003  23:25:12 Jeff Rude posted: 
 I have successfully learned to Insert data to a website using the Insert Record command under behaviors in DMX.  I have also added a repeat data function but now I would like to add a sorting function so the last posting is at the top of the list.  I have poked around mySQL Manager and Dreamweaver in the Help files but I have not found anything.  Is this done in mySQL or in Dreamweaver?  I am assuming it's done in Dreamweaver because I have changed the order of the data in mySQL and the next inserted data is still put at the bottom.  What do I need to do?  Replies
 Replied 27 May 2003  09:10:12 
   27 May 2003  09:10:12 Vince Baker replied: 
  Use the Order By statement in your sql.
If you have a date or a sequential id you can sort by that.
When you add a recordset click on advanced and add something like the following:
Select *
from yourtable
Order By Date ASC
ASC will sort ascending
DESC will sort descending.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
  If you have a date or a sequential id you can sort by that.
When you add a recordset click on advanced and add something like the following:
Select *
from yourtable
Order By Date ASC
ASC will sort ascending
DESC will sort descending.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
 Replied 27 May 2003  13:05:13 
   27 May 2003  13:05:13 Jeff Rude replied: 
  Works perfectly, thank you so much.