ODBiC Discussion Board


order by

by Dave, May 23, 2008 12:46

I want to order MergeInvoiceNum in descending order. below is the code to do so. The problem is that when I sort the order numbers (MergeInvoiceNum) in DESC order, the last_id remains at 0 and only the first 10 records display. When you click on More Customers, it only displays the first 10 rows selected. If I remove the DESC, everything works fine except the sort order is incorrect. How can I sort the records in descending order so that the most current orders (largest numbers) display first? Thanks in advance for your help.

Dave

<!--DEFAULT row_limit = 10, last_id = 0-->

<!--SQL SELECT TOP $row_limit$ Merge.MergeInvoiceNum, Merge.MergeTrackingNum, Merge.email, Merge.DeliveredToName, Merge.ShipMeth, Merge.DateOrdered FROM Merge WHERE Merge.MergeInvoiceNum >= '$last_id$' ORDER BY Merge.MergeInvoiceNum DESC-->

<!--IF $row$ >= $row_limit$ --> <P><A H R E F="/ danceshoes4u /cp /edit.ap?last_id=$MergeInvoiceNum$"> <B>More Customers</B></A>


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.