public static ArrayList<Object> updateMerchantStatus(String id, String stat) { Mysql mysqlObj = new Mysql(); ArrayList arrList = null; ArrayList arrList1 = null; try { String selsql = "SELECT * " + " FROM mid_client_pg " + " WHERE pg_id = " + id; arrList1 = mysqlObj.resultSetToArrayList(selsql); if (arrList1 != null) { String updtmcp = "UPDATE mid_client_pg " + " SET is_active = ? " + " WHERE pg_id = ? "; PreparedStatement pstmt = mysqlObj.queryUpdate(updtmcp); pstmt.setString(1, stat); pstmt.setString(2, id); pstmt.executeUpdate(); // issue invalid query pstmt.close(); } } catch (Exception ex) { // err } return arrList; }
public static ArrayList<Object> clientLists() { Mysql mysqlObj = new Mysql(); ArrayList<Object> arrList = null; try { String sql = "SELECT * FROM `client_master`"; arrList = mysqlObj.resultSetToArrayList(sql); } catch (SQLException ex) { // err Log.logger.warning("Currency List Exception " + ex.toString()); } return arrList; }