Cron error on postgres
Created by: ilu33
everytime Cron runs:
2016-09-10 07:53:09
select atoken_id from atoken where atoken_expires != '0001-01-01 00:00:00' && atoken_expires < now() at time zone 'UTC'; returned false
ERROR: operator does not exist: boolean && timestamp without time zone
LINE 1: ...ken where atoken_expires != '0001-01-01 00:00:00' && atoken_...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
replace &&
with AND
(Source: [0])
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index c66b62f..84f13c8 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -64,7 +64,7 @@ class Cron {
// delete expired access tokens
- $r = q("select atoken_id from atoken where atoken_expires != '%s' && atoken_expires < %s",
+ $r = q("select atoken_id from atoken where atoken_expires != '%s' AND atoken_expires < %s",
dbesc(NULL_DATE),
db_utcnow()
);
[0] = https://stackoverflow.com/questions/4105658/the-difference-between-and-and-in-sql