括号和逗号出现在列表中

时间:2018-04-08 04:09:29

标签: python

我正试图在数字中找到14个连续数字的最佳产品,但逗号,括号和引号仍然出现在第7行

Statement stmt = pc.getStatement();
try
{
    ResultSet rs = stmt.executeQuery("select * from artigos where 
        artigoc="+s);

    while (rs.next())
    {
        int stock = rs.getInt("stock");

        stmt.executeUpdate("update artigos set stock="+newStock+","
                + "vendidos="+newVendidos+" where artigoc="+s);
    }
    rs.close(); // muito importante depois da consulta!
} catch (Exception e) {
    e.printStackTrace();
    System.err.println("Problems retrieving data from db...");
}

0 个答案:

没有答案