Reply
Old 10-06-2004, 09:21 AM Order By
frik's Avatar
Average Talker

Posts: 26
Location: SOuth Africa
This is my select statement
strSQL = "SELECT * FROM application ORDER BY rating DESC"

When I run the code this is the error I am getting:
Syntax error in ORDER BY clause.

What am I doing wrong ?
frik is offline
Reply With Quote
View Public Profile Visit frik's homepage!
 
When You Register, These Ads Go Away!
     
Old 10-06-2004, 11:04 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Two things -- first, make sure that you have a column in your "application" table called "rating." Make sure you have no capitalization differences as well. Second, what data type is "rating?" It needs to be either a numeric or VARCHAR or something which MySQL knows how to order -- I will assume that it is an INT or DOUBLE, so that should be find.

As a means of checking that you are good on all other points, try running just this SQL with no errors:
SELECT * FROM application
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Reply     « Reply to Order By
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13640 seconds with 13 queries