This problem is baffling me:
BEGIN;
INSERT INTO sub_users(user_id, email)
SELECT user_id FROM users WHERE email='[email protected]', '$email';
COMMIT;
Normally, I have multiple statements in that transactions, but I've removed those for clarity.
I get this error:
#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 ' '[email protected]'' at line 1
I'm using MySQL version 5.1.36