Need help troubleshooting. With 4.6 I installed video module. It works in IE but not Safari, but when I try to turn on administer/block, I get this error:

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 'DISTINCT(n.nid)) , n.title FROM node n INNER JOIN video v WHERE
query: SELECT DISTINCT (DISTINCT(n.nid)) , n.title FROM node n INNER JOIN video v WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER by n.created DESC LIMIT 0, 10 in /home/www/obinc.us/html/drupal2/includes/database.mysql.inc on line 66.

Comments

fax8’s picture

strange error..
here it never appeard...

What version of video.module and drupal are you using?

The video.module is tagged on the first line with a version number.

sciman’s picture

What a great idea to have a version number near the top of a file! ;-) What I see is version 1.5 with a date of 2005/06/25. I'll have to go check and see if there's a newer version!

sciman’s picture

4.6.3 on the drupal stuff.. new install though I've probably overdone the modules;-)

LukeLast’s picture

You could try the new code updated here http://drupal.org/node/30943

Since you're running 4.6 and not CVS you could try using this new SQL statement.

Old:

"SELECT DISTINCT(n.nid), n.title FROM {node} n, {video} v
 WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0
 ORDER by $orderby DESC"),0, 10));

New:

"SELECT n.nid, n.title FROM {node} n, {video} v
 WHERE n.nid = v.nid AND n.type = 'video' AND n.status = 1 AND n.moderate = 0
 ORDER BY $orderby DESC"),0, 10));
sciman’s picture

Thanks. Worked like a charm. The code in the module which I found to edit was not identical, but close.. and your suggestion was perfect. Much appreciated!

LukeLast’s picture

Status: Active » Fixed

Glad to hear it, CVS shouldn't have this problem then.

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)