$onlineg= mysql_query("select * from wizard_ex_guzel order by rand() where onay1<>'1' and active='1' ");

bu şekil denermisin