Jump to content

:: Syntax Error


anevins

Recommended Posts

I've got a syntax error with my sql query and I don't know the correct structure.

 

I want to select all from a table 'rating' where the column 'check' is equal to the value 'checked', and I want to order it by the id descending, with a limit of 3.

 

This is the wrong syntax:

SELECT * FROM rating WHERE check='checked' ORDER BY rating_id DESC LIMIT 3

 

Any ideas on the right syntax?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.