New to this and not too sure exactly what you want but... maybe this will help????
$res1=mysql_query("SELECT FROM table_name WHERE selected='yes'");
$num=mysql_num_rows($res1);
$randnum=rand(0,$num);
$res=mysql_query("SELECT FROM table_name WHERE selected='yes' LIMIT $randnum, 1");
Not even sure if that works... if you have an ID column you can do it by:
$res1=mysql_query("SELECT FROM table_name WHERE selected='yes'");
while($row=mysql_fetch_array($res1)) {
$IDarray=$num.",'$row[id]'";
}
$count1=count($IDarray);
$randid=rand(0,$count1);
$randomid=$IDarray[$randid];
$res=mysql_query("SELECT FROM table_name WHERE id=$randomid");
Heh... dont count on my spelling or typing and double check it all... but it mite work (have no idea).