Ne bu sorgu ile yanlış?

0 Cevap php

Ben bir PHP sayfası çalışan, bu sorgu var:

       $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";

Ancak, onu çalıştıran üzerine aşağıdaki hataları verir:

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

Hat 7 bu varlık:

  AND tracking_table.recipient_id = $recipient_id

Bazı sunucu bilgileri:

PHP Version 5.2.6-1+lenny9
MySQL Version 5.0.51a

Teşekkürler :-)

0 Cevap