$stmt = pdo()->prepare("INSERT INTO `freeroll` (`name_turnament`, `prize`, `password`, `data`, `time`, `category_id`, `prize_symbol`, `buyin` , `buyin_symbol`, `category_name`, `category_img`, `category_url`)
SELECT :name_turnament, :prize, :password, :data, :time, :category_id, :prize_symbol, :buyin, :buyin_symbol, name, img, url FROM category WHERE id = :category_id");
$stmt->execute([
'name_turnament' => $_POST['name_turnament'],
'prize' => $_POST['prize'],
'password' => $_POST['password'],
'data' => $_POST['data'],
'time' => $_POST['time'],
'category_id' => $category_id,
'prize_symbol' => $_POST['symbol'],
'buyin' => $_POST['buyin'],
'buyin_symbol' => $_POST['buyin_symbol']
]);
SELECT 1, 2, 3, 'bla-bla', `name`, `img`, `url` FROM `category`
"SELECT :name_turnament, :prize, :password и так далее"
SELECT `id`, `user_id`, `articul_id`, `barcode`, `quantity`, 3 as supply_id FROM `order`
$text = '';
while($result = mysql_fetch_array($sql))
{
.....
$text .= "\n_____________\nДата и время: <code>".$result['date']."</code>\nПользователь: <code>".$user."</code>\nСумма: <code>".$result['amount']." руб.</code>\nКатегория: <code>".$user."</code>";
}
// здесь наверно нужно $text отослать через бота юзеру