Instantly share code, notes, and snippets.

Embed
What would you like to do?
SQL запрос на изменение значения поля, если разница между текущей датой и датой в базе больше 5 минут но меньше 100 дней
$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