SAVE Inc.

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 subnav.article_fk IS NOT NULL ORDER BY subnav.sequence ASC' at line 1
SELECT subnav.id, subnav.url, subnav.parent_id, subnav.linkname, a.friendlyURL, subnav.homepage, subnav.article_fk FROM navigation AS nav LEFT JOIN navigation AS subnav ON subnav.parent_id=nav.id LEFT JOIN articles AS a ON a.id=subnav.article_fk WHERE nav.article_fk= AND subnav.article_fk IS NOT NULL ORDER BY subnav.sequence ASC