use Telegram\Bot\Keyboard\Keyboard;
$keyboard = Keyboard::make();
$keyboard->row(Keyboard::Button(['text' => "Button 1"]));
$keyboard->row(Keyboard::Button(['text' => "Button 2"]));
$response = $telegram->sendMessage([
'chat_id' =>$chat_id,
'text' => 'Hello World',
'reply_markup' =>$keyboard
]);
$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, .......... и тд, 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'],
'prize_symbol' => $_POST['symbol'],
'buyin' => $_POST['buyin'],
'buyin_symbol' => $_POST['buyin_symbol'],
'category_id' => $category_id
]);
$query = ("
INSERT INTO `order_archive`(`id`, `user_id`, `articul_id`, `barcode`, `quantity`, `supply_id`) VALUES ($supply_id)
SELECT `id`, `user_id`, `articul_id`, `barcode`, `quantity`, " . $supply_id . " as supply_id FROM `order` WHERE `id` IN ($ids);
DELETE FROM `order` WHERE `id` IN ($ids)");
public function updateDevMode(){
$devices_dep = "YOUR_TABLE_NAME";
$device_mode=htmlspecialchars(strip_tags($this->device_mode));
$id=htmlspecialchars(strip_tags($this->id));
$sqlQuery = "UPDATE $devices_dep SET device_mode=$device_mode WHERE id=$id";
$this->db->query($sqlQuery);
if($this->db->affected_rows > 0){
return true;
}
return false;
}