I downloaded and installed this module on a new test site running D6.2. I enabled the module, then went and enabled the "Please Register" block to appear in the content area. Instead of seeing the block, I got this message:

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 '0' at line 1 query: SELECT perm FROM permission WHERE rid = 2,0 in /home/pub/web/pic.test.kosada.com/sites/all/modules/please_register/please_register.module on line 202.

Comments

bbinkovitz’s picture

I poked into this a little more and discovered that line 202 contains
$sql_user = db_query('SELECT perm FROM {permission} WHERE rid = '. $placeholders .'', $rids);
which, when changed to
$sql_user = db_query('SELECT perm FROM {permission} WHERE rid IN ('. $placeholders .')', $rids);
stops giving the error.

I have no idea if this is at all proper, but it seems to work.

tomaszx’s picture

Assigned: Unassigned » tomaszx
Priority: Normal » Critical
Status: Active » Fixed

Hello.

Yes, you are right. This bug is when user have more than one role.
It's true that i forgot about " in ( )"

Thank you for issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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