connect_errno > 0){
die('Unable to connect to database [' . $db->connect_error . ']');
}
$rand = mt_rand(1, 6);
$ads = "SELECT * FROM `ads` WHERE `id` = $rand";
if(!$result = $db->query($ads)){
die('There was an error running the query [' . $db->error . ']');
}
$row = $result->fetch_assoc();
if($row){
return '';
}
}
?>