I have a select query in mysql . On each execution of this query I need different amount of data, between 10 and 30 entries.
I tried with following code :
'SELECT * FROM user where status='0' LIMIT 10,30'
But it’s always giving result of limit 30.
How can i execute it?
LIMIT x,y says that you’ll get 30 results up from position 10
try $limit = rand(10,30)–> …LIMIT '.$limit.'