ok, couldn't get the e-mail working but by trial and error I've traced the problem to the first SQL query. If I put it into plain SQL like...
Code:
UPDATE user AS user SET customtitle = 0 WHERE customtitle = 2 AND user.usergroupid IN (SELECT usergroupid FROM usergroup where (genericpermissions & 2048) = 0)
and run it through mySQL it returns the following error...
Quote:
#1064 - 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 'SELECT usergroupid FROM usergroup where (genericpermissions & 2
|
...and I'm using mySQL version 4.0.22-nt
Does that give any clues?