-1

只需要有人告诉我这个语句是否有正确的语法;我无法让它正常工作。

SELECT plantname, orderfreq, totalincome 
FROM plantreview 
WHERE score >='5' 
AND recommended='1' 
ORDER BY score DESC, LIMIT +0, 5
4

1 回答 1

1

假设 MySQL,在or,之后不应该有. 如果您的列是整数,则也不需要将其括在引号中。ORDER BY+LIMIT

SELECT plantname, orderfreq, totalincome 
FROM plantreview 
WHERE score >='5' 
AND recommended='1' 
ORDER BY score DESC
LIMIT 0, 5

看到它在行动

于 2013-01-04T21:30:20.317 回答