public static int getLastId()
        {
            String sql = "SELECT idclientes FROM clientes ORDER BY idclientes DESC LIMIT 0,1";
            if(!BD.getInstance().sqlSelect(sql)){
                return 0;
            }
            if(!BD.getInstance().sqlFetch()){
                return 0;
            }

            return BD.getInstance().getInt("idclientes");
        }