用户:
Dao3的C6H8O7查看:0 回复:2 评论:0 创建时间:2022-06-30T09:31:03
await db.sql`
insert into 'player'(
"NAME",
"MONEY",
"X",
"Y",
"Z",
"USERKEY"
) values (
${entity.player.name},
${entity.money},
${Math.round(entity.position.x)},
${Math.round(entity.position.y)},
${Math.round(entity.position.z)},
${entity.player.userKey}
)
on conflict("USERKEY") -- 如果已经存在同样的用户识别码
do update set
"NAME" = excluded.name,
"X" = excluded.x,
"Y" = excluded.y,
"Z" = excluded.z,
"MONEY" = excluded.money
)`
`
哪儿错了?他告诉我说Error: sql error: Error: SQLITE_ERROR: table player has no column named MONEY,可是就是有MONEY呀