I get the following error when attempting to use the Movie Review Listing page (?q=moviereview):

user 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, m.movietitle, m.cover, m.director, m.genre, m

query: SELECT DISTINCT m.DISTINCT(n.nid), n.title, m.movietitle, m.cover, m.director, m.genre, m.release, m.runtime, m.rating, m.imdb, m.price FROM moviereview m INNER JOIN node n ON m.nid = n.nid WHERE n.status = 1 ORDER BY n.title ASC LIMIT 0, 20

in /Users/coyote/Sites/coyoteoldone/includes/database.mysql.inc on line 66.

Am I the only one having this problem? Seems kinda peculiar, since that query can't work, at least with the version of MySQL I have.

Comments

sergio@www.s3006.com.br’s picture

In moviereview.module, at the line 262, change the line to the following:

$sql = db_rewrite_sql('SELECT DISTINCT(m.nid), n.title, m.movietitle, m.cover, m.director, m.genre, m.release, m.runtime, m.rating, m.imdb, m.price FROM  {moviereview} m INNER JOIN {node} n ON m.nid = n.nid WHERE n.status = 1');

That worked out for me.

I'm using this version:
$Id: moviereview.module,v 1.4 2005/08/09 00:22:30 emiliano Exp $

sergio@www.s3006.com.br’s picture

Sorry about last post. The correct line is this one:

$sql = db_rewrite_sql('SELECT DISTINCT(n.nid), n.title, m.movietitle, m.cover, m.director, m.genre, m.release, m.runtime, m.rating, m.imdb, m.price FROM  {moviereview} m INNER JOIN {node} n ON m.nid = n.nid WHERE n.status = 1');

Regards...

Emiliano’s picture

Commited to moviereview.module 4.6 on 2005/11/12.

Emiliano’s picture

Status: Active » Fixed

Ok, forgot to change the status. Now it's fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)