SQL
package com.conn;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.management.openmbean.OpenMBeanAttributeInfoSupport;
public class SqlTest {
public void ins_shop(shops shop) throws SQLException {
String sqlString="insert into tb_goods values("+shop.getGoodId()+","+'"'+shop.getGoodName()+'"'+","+shop.getNum()+","+shop.getPrice()+")";
Connection conn =JBconnection.getcon();
PreparedStatement ps =conn.prepareStatement(sqlString);
int rSet= ps.executeUpdate();
}
public void delete_shop(int id) throws SQLException {
String sqlString="delete from tb_goods where goodId="+id;
Connection conn =JBconnection.getcon();
PreparedStatement ps =conn.prepareStatement(sqlString);
int rSet= ps.executeUpdate();
JBconnection.close(null, ps, conn);
}
public static ArrayList