Gossamer Forum
Home : Products : DBMan SQL : Discussion :

How to sort Keydb in sql?

Quote Reply
How to sort Keydb in sql?
It just doesn;t work like the way the flat text version does.

This is what I typed:
?db=offers&uid=default&view_records=1&ID=*&sb=ID&so=descend

I also try:
?db=offers&uid=default&view_records=1&ID=*&sb=0&so=descend

and this is the error:
In Reply To:
CGI ERROR
==========================================
Error Message : Unable to query database. Reason: parse error near 'descend
LIMIT 0, 10
' at line 5. Query:
SELECT ID,create_time,HScode,Name,Email,Company,Address,City,State,Zip,Country,Phone,Fax,Homepage,Subject,Details,Offers,userid FROM Opportunity
WHERE
ID >= 0
ORDER BY ID descend
LIMIT 0, 10

Script Location : /usr/home33/anteroma/public_html/cgi-bin/db/db.cgi
Perl Version : 5.00503
Setup File : offers.cfg
User ID : default
Anyone experience this?

The database is supposed to be displaying the latest data entry instead of the oldest.


Thanks, any information would be very appreciate it.


__________________________
SantanaBlank
Quote Reply
Re: How to sort Keydb in sql? In reply to
In Reply To:
It just doesn;t work like the way the flat text version does.
This is what I typed:
?db=offers&uid=default&view_records=1&ID=*&sb=ID&so=descend
Try this:
?db=offers&uid=default&view_records=1&ID=*&sb=ID&so=desc

or for ascending order:

?db=offers&uid=default&view_records=1&ID=*&sb=ID&so=asc


easy does it
Quote Reply
Cool In reply to
Cool! it works.

Thanks again for you help :)

__________________________
SantanaBlank