我打算做个论坛,讲发表的主题保存在一张表中,表中ID字段为主键,而且设为自增量。 当我写入时,若SQL语句这样写,无法写入: insert into tb_forumSend values ('"+sort+"','"+title+"','"+content+"','"+account+"','"+ip+"','"+showTime.showTodayTime()+"') 如果写成: insert into tb_forumSend values ('3','"+sort+"','"+title+"','"+content+"','"+account+"','"+ip+"','"+showTime.showTodayTime()+"') 就能写入。 为什么自增量还需要写入? 正确的格式该怎样写?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货