这个问题让我很困惑:
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 版