What's wrong with this query?

BarefootGirl

New Member
I have this query, running from a PHP page:\[code\] $feed_sql = "SELECT id, title, description, rssDate FROM feed WHERE MATCH (title) AGAINST ('" . $rows['suburb'] . "') AND NOT EXISTS(SELECT feed_id, recipient_id, issent FROM tracking_table WHERE tracking_table.feed_id = $feed_id AND tracking_table.recipient_id = $recipient_id AND tracking_table.issent = 'Y') GROUP BY pubDate ORDER BY pubDate DESC LIMIT 1";\[/code\]However, it returns the following errors upon running it:\[quote\] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND tracking_table.recipient_id = AND tracki' at line 7\[/quote\]Line 7 being this: \[code\] AND tracking_table.recipient_id = $recipient_id\[/code\]Some server information:\[quote\] PHP Version 5.2.6-1+lenny9
MySQL Version 5.0.51a \[/quote\]Thanks :-)
 
Back
Top