HTML
- 7 ответов
- 0 вопросов
3
Вклад в тег
$sql = "UPDATE `list`
SET count1 = CASE WHEN id = ? AND ? = 1 THEN count1 - ? ELSE count1 END,
count2 = CASE WHEN id = ? AND ? = 2 THEN count2 - ? ELSE count2 END,
count3 = CASE WHEN id = ? AND ? = 3 THEN count3 - ? ELSE count3 END
WHERE id = ?";
$stmt = $conn->prepare($sql);
foreach ($data as $id => $value) {
$idParts = explode("-", $id);
$count = $value['count'];
$stmt->execute([$idParts[0], $idParts[1], $count, $idParts[0], $idParts[1], $count, $idParts[0], $idParts[1], $count, $idParts[0]]);
}
sudo chown -R www-data:имя_пользователя /home/dkfire/code/php/dkfire
sudo chmod -R 755 /home/dkfire/code/php/dkfire
$arr = file("reviews.dat");
$res = array_slice($arr, 0, 2);
foreach ($res as $str) {
echo $str;
}
$arr = file("reviews.dat");
$arr = array_reverse($arr);
$res = array_slice($arr, 0, 2);
foreach ($res as $str) {
echo $str;
}
export default {
data() {
return {
isModalAddVisible: false,
activeId: null,
};
},
watch: {
isModalAddVisible(newValue) {
if (newValue || this.activeId) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = 'auto';
}
},
activeId(newValue) {
if (this.isModalAddVisible || newValue) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = 'auto';
}
},
},
};