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
Post a Comment