android.database.sqlite.SQLiteException: no such column: false (code 1 SQLITE_ERROR): , while compiling: insert into msg sqlite
sqlite插入数据失败
android.database.sqlite.SQLiteException: no such column: false (code 1 SQLITE_ERROR): , while compiling: insert into msg sqlite
sqlite插入数据失败
季兆星 - 念念堂
else if (typeof data[key] == 'boolean') {
sum += ${data[key]?1:0},
}
添加判断 如果是 true 用1 代表 false 用0 表示
MsgManager.js
if(key == 'body'){
let body = JSON.stringify(data.body)
try{
body = escapeHtml(body)
// console.log('bodybodybody',body)
}catch(e){
console.error(e)
}
sum += "${body}",
}else if(typeof data[key] == 'string'){
sum += "${data[key]}",
} else if(typeof data[key] == 'undefined'){
sum += ${null},
}else if (typeof data[key] == 'boolean') {
sum += ${data[key]?1:0},
}
else{
sum += ${data[key]},
}
return sum
hws007
sum += ${data[key]?1:0},
你这一段代码不会报错?
2023-05-11 03:43