مشكلة Unknown column in where clause
السلام عليكم و رحمة الله و بركاته.
عندي مشكلة في الكود التالي.
public void Mots() { int i = 0; try { Connection con = DriverManager.getConnection("jdbc:mysql://localhost/lamsaf", "dbzakaria", "dbzakaria"); Statement stmt = con.createStatement(); ResultSet nive = stmt.executeQuery(" select " + test() + " from Utilisateur WHERE username = " + user); ResultSet rs = stmt.executeQuery("select mot from " + categorie + " WHERE niveau = " + nive.getInt(1) + ""); while (rs.next()) { m[i] = rs.getString(1); System.out.println(m[i]); i++; } while (nive.next()) { niveau = nive.getInt(1); } con.close(); } catch (Exception e) { System.out.println(e.getMessage()); } }
نتيجة التشغيل:
Unknown column 'moha' in 'where clause'
هل يمكنكم مساعدتي و شكراً.