快捷导航

for the right syntax to use near '?where id=?',利用javaWeb

代码:Connection conn =DBHelper.getConnection();                String sql = "update userinfo set balance=?"+"where id=?";                PreparedStatement ps = (PreparedStatement) conn.prepareStatement(sql);                ps.setDouble(1, balance);                ps.setInt(2, id);                ps.executeUpdate(sql);

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

问号和where连起来了,拼接后是?where,中间需要一个空格
回复

使用道具 举报

可能感兴趣的问答

发新帖
TA的信息
  • 会员所属: 注册会员
  • 认证信息: 邮箱认证手机认证
  • 微信访问
  • 手机APP