SQL ERROR: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 ') INNER JOIN weg_pin_perm P ON (P.perm_did=NG.id AND P.perm_group_id=1000) ' at line 3
Invalid SQL: SELECT NL.id AS DID,K.*,NL.*,NC.*,NG.*,NG.id AS NGID,NC.id AS CONID,NL.kid AS CUSTID, COUNT(NL.id) AS NCOUNT FROM weg_pin_items NL INNER JOIN weg_pin_groups NG ON (NG.id=NL.group_id AND NL.group_id=) INNER JOIN weg_pin_perm P ON (P.perm_did=NG.id AND P.perm_group_id=1000) LEFT JOIN weg_pin_content NC ON (NL.id=NC.nid AND NC.lang_id=1) LEFT JOIN weg_admins K ON (K.id=NL.mid) WHERE NL.approval=1 AND (NL.tags LIKE '%,Immunsystem,%' OR NL.tags LIKE 'Immunsystem,%' OR NL.tags LIKE '%,Immunsystem' OR NL.tags='Immunsystem') AND NC.title!='' GROUP BY NL.id ORDER BY NL.ndate DESC
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 ') INNER JOIN weg_pin_perm P ON (P.perm_did=NG.id AND P.perm_group_id=1000) ' at line 3