Order all mysql data by rand then order it by column -
i have 1000 records querying , ordering random. each record has business type want order random businesstype. query :
$sqlquery = "select * businesses postcode regexp '^" . $pcode . "[0-9]' , businessid not in (select businessid telesales.notinterested now() between dateofcall , (dateofcall + interval 42 day)) order rand() limit 500";
if rand(), businesstype
random still, , if try group businesstype after rand doesnt give results. ideas?
Comments
Post a Comment