<input type="number" step="0.00000001" id="numberInput" />
<script>
const input = document.getElementById("numberInput");
input.addEventListener("input", () => {
const value = parseFloat(input.value);
if (!isNaN(value)) {
input.value = value.toFixed(8); // Форматируем до 8 знаков после запятой
}
});
</script>
WITH RECURSIVE
cte1 AS ( SELECT MIN(DATE(create_date)) mindate, MAX(DATE(create_date)) maxdate
FROM shops
UNION ALL
SELECT MIN(DATE(create_date)) mindate, MAX(DATE(create_date)) maxdate
FROM users ),
cte2 AS ( SELECT MIN(mindate) mindate, MAX(maxdate) maxdate
FROM cte1 ),
dates AS ( SELECT mindate thedate, maxdate
FROM cte2
UNION ALL
SELECT thedate + INTERVAL 1 DAY, maxdate
FROM dates
WHERE thedate < maxdate ),
shopstat AS ( SELECT DATE(create_date) thedate, COUNT(*) cnt
FROM shops
GROUP BY thedate ),
userstat AS ( SELECT DATE(create_date) thedate, COUNT(*) cnt
FROM users
GROUP BY thedate )
SELECT thedate `date`,
COALESCE(shopstat.cnt, 0) shops,
COALESCE(userstat.cnt, 0) users
FROM dates
LEFT JOIN shopstat USING (thedate)
LEFT JOIN userstat USING (thedate)
---
listen = /var/run/php-fpm.sock
---
---
fastcgi_pass unix:/var/run/php-fpm.sock;
---
---
listen = 0.0.0.0:9000
---
---
fastcgi_pass php:9000;
---
SELECT `new_tours`.* FROM `new_tours`
LEFT JOIN `tours_prices` `lp` ON `new_tours`.`id` = `lp`.`tour_id`
LEFT JOIN `currency` ON currency.code = "RUB"
LEFT JOIN `user_wallet` ON user_wallet.user_id = new_tours.user_id
WHERE ((select max(`price`) from `tours_prices`) < user_wallet.balance)
GROUP BY `new_tours`.`id`
Очищаю кеш браузера, всё равно получаю 404. При этом, открыв страницу в другом браузере, вижу её корректно.