I've been trying to get this to work on Drupal 4.5 w/ Spam 2.0. I received the following error when on the admin/trackback/list/spam page:

user error: You have an error in your SQL syntax near 'WHERE s.id = tr.trid AND s.source = trackback AND s.probability >= 80 ' at line 1 query: SELECT COUNT(*) FROM spam_tracker s INNER JOIN trackback_received tr WHERE s.id = tr.trid AND s.source = trackback AND s.probability >= 80 in /drupal45/includes/database.mysql.inc on line 125.

I then looked at that line which reads:
$sql = "SELECT tr.*, s.probability FROM {spam_tracker} s INNER JOIN {trackback_received} tr WHERE s.id = tr.trid AND s.source = 'trackback' AND s.probability >= 80";

Should it be the following (notice changed first WHERE to ON for the INNER JOIN) or is this because I'm using it on 4.5? Changing it to the below fixed the error on 4.5:

$sql = "SELECT tr.*, s.probability FROM {spam_tracker} s INNER JOIN {trackback_received} tr ON s.id = tr.trid WHERE s.source = 'trackback' AND s.probability >= 80";

Ian

Comments

ankur’s picture

Status: Active » Closed (duplicate)

I think this is the same issue as the one reported in http://drupal.org/node/30874

-Ankur

Ian Ward’s picture

Yes, indeed it is. Sorry, I somehow missed that issue.

Ian