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

marcus0263’s picture

Yep, same error with both Drupal 6.3 and with 6.4

* user warning: Table 'xxxxxxxx.comments' doesn't exist query: select c1.cid, concat('0,', if(c1.pid <> 0, concat(c1.pid, ','),'') ) as parents from comments c1 in /####/####/####/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 /###/###/######/sites/all/modules/comment_subscribe/comment_subscribe.module on line 443.

danylevskyi’s picture

I 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.

jason.schoeman’s picture

Version: 6.x-1.1 » 5.x-1.2
Component: User interface » Code

Yes same in V5. I do not know if it will still work though...

sidharth_k’s picture

Hi 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.

Alex_Tutubalin’s picture

Fixed in my Postgresql patch (in MySQL mode too) http://drupal.org/node/319441

rares’s picture

Status: Active » Needs review

The 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)

zyxware’s picture

Assigned: Unassigned » zyxware
Status: Needs review » Active

Hi all,
The problem will be fixed in the next commit.

Thanks
zyxware

zyxware’s picture

Status: Active » Needs review

Hi All,

The problem fixed in the latest dev release. Do check and inform us any bugs there?

Regards
zyxware

zyxware’s picture

Status: Needs review » Fixed

The issue has been fixed in the latest release

milianw’s picture

There'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.

anoopjohn’s picture

Status: Fixed » Active

Changing status to active

zyxware’s picture

Status: Active » Fixed

Fixed the issue in the latest commit

Regards
zyxware

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ap’s picture

Version: 5.x-1.2 » 6.x-1.2

I just downloaded version 6.x-1.2 and the bug still seems to be there.