} else if ($_POST['gen-type'] == 2) {
$adv = explode('id/', $_SERVER['REQUEST_URI']);
$adv_db = $db->query("SELECT * FROM `adv` WHERE `id` = '$adv[1]' LIMIT 1");
while ($adv_query = mysqli_fetch_array($adv_db))
{
$adv_type = $adv_query['gen-type'];
$adv_id = $adv_query['id'];
$adv_title = $adv_query['title'];
$adv_price = $adv_query['price'];
$adv_image = $adv_query['image'];
$adv_worker_id = $adv_query['worker_id'];
$adv_worker_username = $adv_query['worker_username'];
$adv_fio = explode(" ",$adv_query['fio']);
$adv_address = $adv_query['address'];
}
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in путь/db.php on line 24