Closed (fixed)
Project:
Comment Subscribe
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Jul 2008 at 17:38 UTC
Updated:
19 Feb 2009 at 09:56 UTC
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 'left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null' at line 2 query: insert into z_commentsubscribe (cid, parents, subscribe, subscribenode) left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null in ###Sorry, nonofficial project, can't disclose the path in my filesystem here###/htdocs/sites/all/modules/comment_subscribe/comment_subscribe.module on line 443.
Comments
Comment #1
marcus0263 commentedYep, same error with both Drupal 6.3 and with 6.4
Comment #2
danylevskyiI have the same problem:
* user warning: Table 'wwwfood_db.comments' doesn't exist query: select c1.cid, concat('0,', if(c1.pid <> 0, concat(c1.pid, ','),'') ) as parents from comments c1 in /arc/www/food/sites/all/modules/comment_subscribe/comment_subscribe.module on line 428.
* 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 'left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null' at line 2 query: insert into z_commentsubscribe (cid, parents, subscribe, subscribenode) left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null in /arc/www/food/sites/all/modules/comment_subscribe/comment_subscribe.module on line 443.
Comment #3
jason.schoeman commentedYes same in V5. I do not know if it will still work though...
Comment #4
sidharth_k commentedHi I too have the same error! Any ideas? I want to use comment subscribe in a production server so am worried about data corruption with these SQL errors. Are they any substitutes to comment subscribe?
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 'left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null' at line 2 query: insert into z_commentsubscribe (cid, parents, subscribe, subscribenode) left join z_commentsubscribe cs on c1.cid = cs.cid where cs.subscribe is null in /home/sidk/public_html/change/public/includes/database.mysqli.inc on line 154.
Comment #5
Alex_Tutubalin commentedFixed in my Postgresql patch (in MySQL mode too) http://drupal.org/node/319441
Comment #6
rares commentedThe issue here is that the table names weren't bracketed and thus is doesn't work if the database setup has table prefixes:
i.e.
$sql = "select c1.cid, concat('0,', ".$ifcondition." ) as parents from comments c1 ".$join;
should be
$sql = "select c1.cid, concat('0,', ".$ifcondition." ) as parents from {comments} c1 ".$join;
(line 427 of version 6.x-1.1)
and
$join .= " join comments c".$level." on c".$prvlevel.".pid=c".$level.".cid";
should be
$join .= " join {comments} c".$level." on c".$prvlevel.".pid=c".$level.".cid";
(line 425 of version 6.x-1.1)
Comment #7
zyxware commentedHi all,
The problem will be fixed in the next commit.
Thanks
zyxware
Comment #8
zyxware commentedHi All,
The problem fixed in the latest dev release. Do check and inform us any bugs there?
Regards
zyxware
Comment #9
zyxware commentedThe issue has been fixed in the latest release
Comment #10
milianw commentedThere's still an error left:
In comment_subscribe.isntall the line:
db_query("INSERT INTO z_nodesubscribe (nid, uid) select nid,uid from node");
should instead be:
db_query("INSERT INTO {z_nodesubscribe} (nid, uid) select nid,uid from {node}");
I think (i.e. my tables have prefixes and thus should be prefixed accordingly. I'm not sure that's the right syntax but afair it should.
Comment #11
anoopjohn commentedChanging status to active
Comment #12
zyxware commentedFixed the issue in the latest commit
Regards
zyxware
Comment #14
ap commentedI just downloaded version 6.x-1.2 and the bug still seems to be there.