php - mysql rand with condition -


could me out correct syntax query please.

i have, table1:

id,   int on,   tinyint - can 0 or 1 name, varchar(2000) 

from trying 10 random id/name have on set 1.

what query should use?

select id, name table1 `on` = 1 order rand() limit 0,10; 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -