I'm using this to retrieve information from a database, the query always brings errors
This is my query:
SELECT * FROM users ORDER BY RAND() LIMIT '10'
It always brings up errors on either the ORDER BY RAND()
or the LIMIT '10'
.
Any reason why this is happening? Also is there any solutions to this?
Limit should be integer? 10 instead '10'.
SELECT *
FROM affiliate
ORDER BY RAND()
LIMIT 10
Note there are no quotes around 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With