Hi,
I'm trying to restrict access to the webform I've created and as the webform module doesn't have that functionality I tried your module out. As soon as I installed it I get the following error, which still persists after I've uninstalled it (from the uninstall tab on the modules page as well, and the file system). Please help!
* 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 'DISTINCT(n.nid), n.changed FROM mazdatri_node n ' at line 1 query: SELECT n.created, n.title, DISTINCT(n.nid), n.changed FROM mazdatri_node n WHERE n.status = 1 and type='blog' ORDER BY n.changed DESC LIMIT 5 in /home/mazda/www/includes/database.mysql.inc on line 172.
* 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 'DISTINCT(n.nid), n.changed FROM mazdatri_node n ' at line 1 query: SELECT n.created, n.title, DISTINCT(n.nid), n.changed FROM mazdatri_node n WHERE n.status = 1 and type='forum' ORDER BY n.changed DESC LIMIT 5 in /home/mazda/www/includes/database.mysql.inc on line 172.
Comments
Comment #1
Anonymous (not verified) commentedJust to update you, it seems the problem is that the db_rewrite_query puts in a DISTINCT statement which causes an error. For the time being I've just changed my settings so errors are logged but not displayed, and some sql queries I've done I'm just using $sql="my sql statement" instead of db_rewrite_query.
The closest I've found to this error is someone who was using node_access module (similar in function to this one I guess) and it seems something happened to the node_access table, although he said removing the workflow module worked for him - I'm not using that modules. Here's the link:
http://www.nabble.com/My-site-is-haunted!-SQL-code-gets-changed-by-the-P...
Still would appreciate any pointers, would like to get it fixed
Comment #2
Anonymous (not verified) commentedAnother quick update - now I've changed my queries it doesn't seem to be erroring at all which is a good sign - I'd still like to know why/how it did this, I looked through the code but couldn't see any hints...
Comment #3
Anonymous (not verified) commentedOK I re-enabled the module once I changed my code, so far so good so closing.