$folder = addslashes("\\assets\\img\\product\\");
$stmt = $mysql->prepare("INSERT INTO `catalog`(`Name_Product`, `Operator`, `Internet`, `Minuts`, `Sms`, `Price_tarif`, `Price_sim`, `image`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssssssss", $Name_Product, $Operator, $Internet, $Minuts, $Sms, $Price_tarif, $Price_sim, $photoname);
$stmt->execute();
WITH RECURSIVE `subs` (`name`, `value`, `order`) AS (
SELECT CONCAT('{{> ', `p`.`name`, '}}'), `p`.`value`, ROW_NUMBER() OVER ()
FROM `templates` AS `t`
JOIN `parts` AS `p`
ON `t`.`value` LIKE CONCAT('%{{> ', `p`.`name`, '}}%')
WHERE `t`.`id` = 1
),
`result` (`value`, `order`) AS (
SELECT `value`, 0
FROM `templates`
WHERE `id` = 1
UNION SELECT REPLACE(`r`.`value`, `s`.`name`, `s`.`value`), `s`.`order`
FROM `result` AS `r`
JOIN `subs` AS `s`
ON `s`.`order` = `r`.`order` + 1
)
SELECT `value`
FROM `result`
ORDER BY `order` DESC
LIMIT 1
кто чем и как делает бекап баз 1с (клиент-серверная архитектура)?
SELECT user_id, name, MAX(points) as max_points
FROM `games`
GROUP BY user_id, name
ORDER BY max_points DESC
LIMIT 15;
$this->database()->query('UPDATE ' . $this->database()->getTable('ad') . ' SET view = 0 WHERE ad_id = 34');
$this->database()->query('UPDATE ' . $this->database()->getTable('ad') . ' SET view = 1 WHERE ad_id = 35');
$this->database()->query('UPDATE ' . $this->database()->getTable('ad') . ' SET view = 2, amount=466 WHERE ad_id = 36');
SELECT * FROM users WHERE DATE(created_at) = '2024-04-14'
то СУБД должна пройти весь индекс до конца, получить каждое значение created_at, применить к нему функцию, сравнить с переданным значением, и добавить строку в результат запроса. SELECT * FROM users WHERE created_at BETWEEN '2024-04-14 00:00:00' AND '2024-04-14 23:59:59'
Asus RT-G32 или WL-520GC