この問題は私を困惑させています:
BEGIN;
INSERT INTO sub_users(user_id, email)
SELECT user_id FROM users WHERE email='someemail@email.com', '$email';
COMMIT;
通常、そのトランザクションには複数のステートメントがありますが、わかりやすくするためにそれらを削除しました。
次のエラーが表示されます。
#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 ' 'test@email.com'' at line 1
MySQL バージョン 5.1.36 を使用しています