Warning: mysqli_query() expects parameter 1 to be mysqli, string given in /var/www/agentam/data/www/agentam.ru/procs.php on line 355
SELECT *,`baza`.`dat_in` as `bdat_in` FROM `baza` JOIN `users` ON `baza`.`id_ag` = `users`.`id_ag` LEFT JOIN `firms` ON `firms`.`id` = `users`.`firm_id` WHERE `baza`.`show`=1 AND `baza`.`aprove` = 1 AND `terr`=1 AND `ob`=3