Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



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

Posts: 26
Location: SOuth Africa
Trades: 0
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!
 
 
Register now for full access!
Old 10-06-2004, 12:04 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.23376 seconds with 12 queries