insert into t_music_downloadcount(music_id,userid,ip,phoneid,status,downloadstatus,downloadtime,successtime,username)values( '640', '(select userid from t_olebar_user where username ='张三')','111.193.169.58', '1', '2', '1','2010-09-27 18:45:04', '2010-09-27 18:45:04', '张三')
如username->`username`
LINE 1: ...select userid from t_olebar_user where username ='张三...
^In statement:
insert into t_music_downloadcount(music_id,userid,ip,phoneid,status,downloadstatus,downloadtime,successtime,username)values( '640', '(select userid from t_olebar_user where username ='北京金飞鸿首体店_001')','111.193.169.58', '1', '2', '1','2010-09-27 18:45:04', '2010-09-27 18:45:04', '北京金飞鸿首体店_001')
VALUES('640', (SELECT userid FROM t_olebar_user WHERE username ='张三'),
'111.193.169.58', '1', '2', '1','2010-09-27 18:45:04', '2010-09-27 18:45:04', '张三')
mysql> select "'a'";
+-----+
| 'a' |
+-----+
| 'a' |
+-----+
1 row in set (0.00 sec)mysql>
select '640',userid,'111.193.169.58', '1', '2', '1','2010-09-27 18:45:04', '2010-09-27 18:45:04', '张三'
from t_olebar_user where username ='张三'
insert into t_music_downloadcount(music_id,userid,ip,phoneid,status,downloadstatus,downloadtime,successtime,username)values( '640',vuserid ,'111.193.169.58', '1', '2', '1','2010-09-27 18:45:04', '2010-09-27 18:45:04', '张三');这下错不了了吧。