I've got this error occurring thousands of times per day from all sorts of different operations. I can't seem to pinpoint a behavior that is producing this or guess at a pattern. The only thing I can figure out is that its not happening on admin pages.

Any guesses? Which module? Bad theme file?

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 node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((n' at line 1 query: INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) LIMIT 0, 1 in /home/cctvcamb/public_html/includes/database.mysql.inc on line 172.

Comments

Malthus’s picture

What version of Drupal are you running? That query determines whether a user has access to nodes, which is why you won't generally see it on admin pages. The ">" is the problem. Some code is HTML escaping that portion of the query.

seaneffel’s picture

Working with Drupal 5 here. How can I trace that down to a file or module and resolve it?