Created
June 17, 2014 14:21
-
-
Save iredun/96915c2ff84c402a45f6 to your computer and use it in GitHub Desktop.
SQL запрос на изменение значения поля, если разница между текущей датой и датой в базе больше 5 минут но меньше 100 дней
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result=pg_query($this->db,"UPDATE sed_users SET \"ISONLINE\"=false WHERE ((CURRENT_DATE+LOCALTIME)-sed_users.\"LAST_ACTIVITY\") BETWEEN \"00:05:00\" AND \"100 days 23:59:59\""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment