$new_orders[$i]['dostavka']=($new_orders[$i]['adres_dostavki']==0)?'Сомовывоз':implode(', ',\DB::getRow("SELECT `gorod`, `street`, `dom` FROM `adres_dostavki` WHERE `id` IN (SELECT `adres_dostavki` FROM `orders` WHERE `user_id`=?)",$new_orders[$i]['user_id']));
//получаем контактное лицо:
$new_orders[$i]['kl']=implode('<br>',\DB::getRow("SELECT `fio`, `tel`, `email` FROM `users` WHERE `id`=? LIMIT 1",$new_orders[$i]['user_id']));
$new_orders[$i]['dostavka']=($new_orders[$i]['adres_dostavki']==0)?'Сомовывоз':implode(', ',\DB::getRow("SELECT `gorod`, `street`, `dom` FROM `adres_dostavki` WHERE `id` IN (SELECT `adres_dostavki` FROM `orders` WHERE `user_id`=?)",$new_orders[$i]['user_id']));
//Получаем данные об организации
$new_orders[$i]['org']=\DB::getValue("SELECT `txt` FROM `org` WHERE `id`=?",$new_orders[$i]['org_id']);
//получаем контактное лицо:
$new_orders[$i]['kl']=implode('<br>',\DB::getRow("SELECT `fio`, `tel`, `email` FROM `users` WHERE `id`=? LIMIT 1",$new_orders[$i]['user_id']));