MySQL Forums
Forum List  »  PHP

Re: MySQL syntax error - don't get it!
Posted by: Gregary Boyles
Date: August 12, 2026 10:24AM

In MySQL Workbench...

This works:

SELECT * FROM millhouse_db.sponsors WHERE type='funding' ORDER BY business_name;

This fails with a syntax error:

SELECT * FROM millhouse_db.sponsors WHERE type='funding' ORDER BY rank;

Why?

business_name is a varchar(...)

rank is an int(10)

So why can't I sort by an integer column?

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL syntax error - don't get it!
August 12, 2026 10:24AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.