package sqlconnect;

public class Del {
    public static void delete(String table,String attribute,String value){
        if(Database.Maps.containsKey(table)==false){
            System.err.println("没有找到该表");
            return;
        }
        attribute=SQLfilter.filter(attribute);
        value=SQLfilter.filter(value);
        String sqlQue="delete from "+table+" where "+attribute+"="+value;
        try{
            Database.state.execute(sqlQue);
        }catch (Exception e){
            System.err.println("删除失败");
            e.printStackTrace();
        }
    }
}
