foreach($_POST['ad'] as $addKey => $addVal) {
shuffle($_POST['ad']);
$get = "SELECT id,sid,title,type,url FROM wcddl_queue ORDER BY id ASC LIMIT 0, 250";
$get= "SELECT q.id,q.sid,q.title,q.type,q.url FROM wcddl_queue q LEFT JOIN wcddl_sites s ON (s.id = q.sid) ORDER BY s.rating, s.id ASC LIMIT 0,".($this->limit * 4)."";