Dear Friends,
If I use
to check whether the guy exists. IF not found, then I will return loginResult = 0.Code:query = "SELECT * FROM Officer WHERE OfficerID='" + OfficerID + "'"; rs = stmt.executeQuery(query);
But I am afriad of the undetermined result in rs. What's in rs if the OfficerID is not found? Is it null or "" or so? How should I write the following condition?
if ( ... )
loginResult = 0
else
loginResult = 1




Reply With Quote