INSERT INTO login_response(guid,status,msg,res_udata_id,res_udata_token,res_cinfo_appid,res_cinfo_cid,res_cinfo_cname,res_ext_cpid,timestamp) 
VALUES ('{1FD7402D-D990-A760-DFF0-4A47293FC965}','200','成功','085b9249976602610f4269b9528ecf56','ssh1game6a3a25bab7874be3b4c5b86f460b3b7d138899','80000001','600002','aa','','2015-05-29 13:42:54')
语句报错,错误信息是语法错误;
#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 'INSERT INTO login_response(guid,status,msg,res_udata_id,res_udata_token,res_c' at line 1;
经过2天的查找问题是SQL语句前有隐藏的东西不过代码没问题请问怎么解决啊。
这边是代码:
$conn = @mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASSWORD);
    if($conn){
        mysql_select_db(MYSQL_DBNAME,$conn);
    }else{
        echo '数据库链接失败!!!';
    }
$sql = sprintf("INSERT INTO login_response(guid,status,msg,res_udata_id,res_udata_token,res_cinfo_appid,res_cinfo_cid,res_cinfo_cname,res_ext_cpid,timestamp) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",$login_response->getGuid(),$login_response->getStatus(),$login_response->getMsg(),$login_response->getRes_Udata_ID(),$login_response->getRes_Udata_Token(),$login_response->getRes_Cinfo_Appid(),$login_response->getRes_Cinfo_Cid(),$login_response->getRes_Cinfo_Cname(),$login_response->getRes_Ext_Cpid(),$login_response->getTimestamp());
mysql_query($sql);