From: Michal Vaner Date: Mon, 1 Sep 2008 23:15:35 +0000 (+0200) Subject: SQL syntax error X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5ff2169f636c5e325ff48b295ecd33fe0ebbb3cc;p=pciids.git SQL syntax error --- diff --git a/PciIds/DBQ.pm b/PciIds/DBQ.pm index 99472a1..c2aef4b 100644 --- a/PciIds/DBQ.pm +++ b/PciIds/DBQ.pm @@ -59,7 +59,7 @@ sub new( $ ) { 'new-notif' => 'INSERT INTO notifications (user, location, recursive, type, notification) VALUES (?, ?, ?, ?, ?)', 'notify' => 'INSERT INTO pending (user, history, notification, reason) SELECT DISTINCT user, ?, ?, ? FROM notifications WHERE ( notification = 2 OR notification = ? ) AND type <= ? AND ( location = ? OR ( recursive = 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) )', 'newtime-mail' => 'UPDATE users SET nextmail = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * mailgather ) WHERE nextmail < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 0 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( recursive = 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', - 'newtime-xmpp' => 'UPDATE users SET nextxmpp = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * xmppgather ) WHERE nextxmpp < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 1 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( recursive = 1 SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', + 'newtime-xmpp' => 'UPDATE users SET nextxmpp = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * xmppgather ) WHERE nextxmpp < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 1 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( recursive = 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', 'mailout' => 'SELECT pending.user, users.email, pending.reason, history.discussion, history.nodename, history.nodenote, history.time,