I installed the bookreview module early in my configuration of my site. I recently installed the taxonomy_access module (though I am not sure if that is an issue). And when i click on the navigation menu to access my bookreviews I get the following 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 '(n.nid)), n.title, b.booktitle, b.cover, b.publisher, b.isbn, b query: SELECT DISTINCT (b.DISTINCT(n.nid)), n.title, b.booktitle, b.cover, b.publisher, b.isbn, b.copyright, b.pages, b.rating FROM bookreview b INNER JOIN node n ON b.nid = n.nid WHERE n.type = 'bookreview' ORDER BY b.booktitle ASC LIMIT 0, 20 in /home/[SNIP]/database.mysql.inc on line 66.
My server is running: MySQL 4.0.23
Any help?
Comments
Comment #1
jase951 commentedI think this works...not sure though.
But, backup first.
Replace: SELECT DISTINCT (b.DISTINCT(n.nid)), n.title................ in book.module.
With:
SELECT n.nid, n.title,
Comment #2
strannik@drupal.org commentedI had the same error, and the suggested fix listed above works.
However the file to edit is NOT book.module, but bookreview/bookreview.module.
Cheers!
Comment #3
jase951 commentedYeah, sorry I meant bookreview.module.
DNAphil, yes I think it does have something to do with taxonomy_access module, in the same way that other people have had the same problem using taxonomy_access module with other modules.
Should this patch be be committed?
I am assuming that this would be the same for movie review module aswell because theay are based around the same coding.
Comment #4
somebodysysop commentedI'm getting a very similar error with taxonomy_access, only with category module!
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 '(n.nid), n.title FROM category c INNER JOIN category_node r ON c.cid = r.cid INN' at line 1 query: SELECT c.*, r.DISTINCT(n.nid), n.title FROM category c INNER JOIN category_node r ON c.cid = r.cid INNER JOIN category cn ON c.cnid = cn.cid INNER JOIN node n ON c.cid = n.nid INNER JOIN node cnn ON cn.cid = cnn.nid WHERE n.status = 1 AND n.moderate = 0 ORDER BY cn.weight, cnn.title, c.weight, n.title in /var/www/html/doadance/drupal01/includes/database.mysql.inc on line 120.
Could you pleae explain how you corrected this error in bookreview? Was the solution to simply get rid of the DISTINCT part of the statement?
Comment #5
jeremy commentedThis has been fixed in the 4.7 version.
Comment #6
(not verified) commented