我正试图在数字中找到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...");
}