In SQL, when you use the WHERE clause, if you do enclose the argument with apostophes, SQL will interpret that as a field.
So, for example...Hunain is seen as a field in the table.
Select empID from employee where empName = Hunain
In this example, Hunain is taken as a string value.
Select empID from employee where empName = 'Hunain'
In the example you have above...
String query = "select userid from tblUser where email='" + EmplyrSession + "'";
Before you close the first quote, you slip in the first apostrophe so its part of the statement. Then open the quote again after the variable so you can continue the statement, then add the closing apostrophe, then a final quote to close the entire string that you are assigning to the variable "query".