這個問題我莫名其妙:MySQL的交易查詢幫助
BEGIN;
INSERT INTO sub_users(user_id, email)
SELECT user_id FROM users WHERE email='[email protected]', '$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 ' '[email protected]'' at line 1
我使用的MySQL版本5.1.36
我可能要開始一個新的職位,因爲這一個似乎是混亂的每一個人。我只想從用戶表中選擇一個值,然後將$ email的用戶定義值插入到表sub_users中。 – Chad 2009-10-26 03:03:27
不需要新帖子;請仔細閱讀答覆。 – ChssPly76 2009-10-26 03:11:04