我正在尝试开发一个android应用程序,这个脚本将在我的手机上复制一个数据库表,但是执行后他在下面显示这个错误
//---------------Copier-------------------------
$.ajax({
type: "POST",
url: "http://10.0.2.2:1998/bYzance_web_service/get_all_PhrasesTypes.asmx/Get_all_PrasesTypes",
contentType: "application/json; charset=utf-8",
dataType: "json",
async : false,
success: function (data)
{
alert("success: function (data)");
var result = $.parseJSON(data.d);
alert(result[0].Phrase);
for (i = 0; i < result.length; i++)
{
tx.executeSql("INSERT INTO PhrasesTypes (idPhrase,idPhraseES,idRubrique,idTypeTravauxAffichage,Phrase,AidePhrase,AvertissementPhrase,OrdrePhrase,QuotationParDefaut,Published)"
+ " VALUES ('"+result[i].IdPhrase+"',' "+result[i].IdPhraseES+" ',' "+result[i].IdRubrique+" ',' "+result[i].IdTypeTravauxAffichage+" ','"+mysql_real_escape_string(result[i].Phrase)+"',' "+result[i].AidePhrase+" ',' "+result[i].AvertissementPhrase+" ','"+result[i].OrdrePhrase+"','"+result[i].QuotationParDefaut+"','"+result[i].Published+" ')");
console.log(i);
}
},
error: function (e)
{
alert("URL du web service: "+serviceURL+"get_all_PhrasesTypes.asmx/Get_all_PrasesTypes");
}
});//fin Ajax
sqlite 返回:错误代码 =1,“accunedifined”附近的消息:语法错误