Hi

I am getting the following warnings anytime i go to my homepage:-

# user warning: 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 realm = 'node_privacy_byrole_user')) AND grant_view >= 1' at line 1 query: SELECT COUNT(*) FROM node_access WHERE nid = 0 AND ((gid = 0 AND realm = 'all') OR (gid = 1 AND realm = 'node_privacy_byrole_role') OR (gid = AND realm = 'node_privacy_byrole_user')) AND grant_view >= 1 in /var/www/abhachu/drupalforum/includes/database.mysql.inc on line 121.
# user warning: 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 na.realm = 'node_privacy_byrole_user'))) AND n.promote = 1 AND n.status = ' at line 1 query: SELECT COUNT(*) 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') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = AND na.realm = 'node_privacy_byrole_user'))) AND n.promote = 1 AND n.status = 1 in /var/www/abhachu/drupalforum/includes/database.mysql.inc on line 121.
# user warning: 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 na.realm = 'node_privacy_byrole_user'))) AND n.promote = 1 AND n.status = ' at line 1 query: SELECT DISTINCT(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') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = AND na.realm = 'node_privacy_byrole_user'))) AND n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 10 in /var/www/abhachu/drupalforum/includes/database.mysql.inc on line 121

It seems to be complaining about SQL, but with none being in my pages at the moment, i can't see what the problem is. I have also noticed that my Moodle users arent being updated.

Any Ideas?