skip to Main Content

Mysql – How to check for a condition within a while loop java

String valChecker = "SELECT * FROM `committee_memba` where (Rank= 'Chairperson' or Rank='Vice-Chair') and committee_name='" + jComboBox1.getSelectedItem().toString() + "'"; System.out.println(valChecker); PreparedStatement stmt = conn.prepareStatement(valChecker); rs = stmt.executeQuery(); while (rs.next()){ String rnk = rs.getString("Rank"); System.err.println(rnk); if ((rnk.equals("Chairperson") && rank.equals("Chairperson")) || (rnk.equals("Vice-Chair") &&…

VIEW QUESTION

MYSQl calculated field

I'm using mysql 8, I need to create a calculated field named status in the supplier table. When creating this field, it shows an error. where am i going wrong? Could it be a syntax error? create table tbqualificacao( idqualificacao…

VIEW QUESTION
Back To Top
Search