JavaScript
- 13 ответов
- 0 вопросов
8
Вклад в тег
^([\W\d\_]|\&\;)+$
SELECT *
FROM `users` AS `u`
JOIN `activity` AS `a`
ON `a`.`user_id` = `u`.`id`
AND `a`.`modified` >= CURRENT_TIMESTAMP - INTERVAL 15 MINUTE;
SELECT * FROM `users_online` WHERE `age` > 18;
SELECT * FROM (
SELECT *
FROM `users` AS `u`
JOIN `activity` AS `a`
ON `a`.`user_id` = `u`.`id`
AND `a`.`modified` >= CURRENT_TIMESTAMP - INTERVAL 15 MINUTE
) AS `users_online`
WHERE `age` > 18;
SELECT * FROM `users` WHERE `online` = 1;
SELECT * FROM `users` WHERE `online` = 1 AND `age` > 18;