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 pt1.path LIKE '4-16%' LIMIT 1' at line 1
SELECT COUNT(pt.id) AS total FROM ***_project_type AS pt INNER JOIN ***_project_words AS pw ON pt.id = pw.complete_id INNER JOIN ***_ecms_article AS a ON pt.id = a.levelwords AND pt.`status` = 1 INNER JOIN ***_project_type AS pt1 ON pt.pid = pt1.id AND pt1.id = AND pt1.path LIKE '4-16%' LIMIT 1;