fixed SQL writing: keywords upper-case, column/table names in back-ticks. #3010

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Haeder 2016-12-14 20:50:39 +01:00
parent ab50585e9a
commit 9e28f5a0c3

View file

@ -25,13 +25,13 @@ function remove_queue_item($id) {
function was_recently_delayed($cid) { function was_recently_delayed($cid) {
$r = q("SELECT `id` FROM `queue` WHERE `cid` = %d $r = q("SELECT `id` FROM `queue` WHERE `cid` = %d
and last > UTC_TIMESTAMP() - interval 15 minute limit 1", AND `last` > UTC_TIMESTAMP() - INTVAL 15 MINUTE LIMIT 1",
intval($cid) intval($cid)
); );
if (dbm::is_result($r)) if (dbm::is_result($r))
return true; return true;
$r = q("select `term-date` from contact where id = %d and `term-date` != '' and `term-date` != '0000-00-00 00:00:00' limit 1", $r = q("SELECT `term-date` FROM `contact` WHERE `id` = %d AND `term-date` != '' AND `term-date` != '0000-00-00 00:00:00' LIMIT 1",
intval($cid) intval($cid)
); );