i want to have if condition after this query .. this condition is if there is no record found the session should be "" and error msg else the session = the username of the record found (actually this code for checking the login)
//////////
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
Connection connection = DriverManager.getConnection("jdbcdbc:ClassMates"
Statement statement = connection.createStatement();
ResultSet columns = statement.executeQuery("select * from mates where username ='"+strUser+"'"
/////////
//////////
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
Connection connection = DriverManager.getConnection("jdbcdbc:ClassMates"
Statement statement = connection.createStatement();
ResultSet columns = statement.executeQuery("select * from mates where username ='"+strUser+"'"
/////////