Hey guys, I have this error in my watchdog:

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 '' at line 1 query: pager_query SELECT COUNT(*) FROM ((SELECT n.nid, n.sticky, n.created FROM node n INNER JOIN node_access na ON na.nid = n.nid WHERE na.grant_view >= 1 AND na.gid = 0 AND na.realm = 'all' AND n.promote = 1 AND n.status = 1 in /var/wwwcode/prod/htdocs/includes/database.mysql.inc on line 177.

Please help me where to locate this error on my htdocs -- what module/s or template/s or etc.I have observed everytime there's an SQL error, the message directs us to mysql.inc instead of the module/template this line of query is declared, unlike php errors.

This error has been flooding my watchdog, please help me. Thanks

Comments

Anonymous’s picture

Status: Active » Closed (fixed)

this is not a watchdog_live issue.

this is probably a module that does something with node access.

review your module list and see what does special stuff with node access control and it's probably the problem.

jayjaydluffy’s picture

Argh..sorry for the wrong module..I wonder what project this issue be referred to.

Anyway, thank you so much for the information. The problem is we've already have so many module integrated in our system including contributed/custom/created modules. And it is a lot of work to one-by-one search for it. Is there any module developed to track this down?

Thanks

Anonymous’s picture

i've gotten this request before and im not sure why people think its this module?

there's a few modules that touch node access. think of features you have on your setup that allow you to limit users to certain nodes.. an example of this is og.module.

an easy way but kinda time consuming is to enable modules 1 by 1 until the error stops :S

best of luck.