i have a error here anyone know how to fix it? i got no idea which part i missed. in lib i already import the jar.
String sql ="SELECT`username`,`password`FROM userdetail WHERE `username = ?``password = ?`";
try{
con = DriverManager.getConnection("jdbc:mysql://localhost/logininfo","root","");
pst = con.prepareStatement(sql);
pst.setString(1,username.getText());
pst.setString(2,password.getText());
rs=pst.executeQuery();
if(rs.next())
{
JOptionPane.showMessageDialog(null, "username and password matched");
}
else{
JOptionPane.showMessageDialog(null, "username and password do not matched");
}
}catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex);
}