According to the user's input I want to select the record from the database. This is my code:
<%
String jempid=request.getParameter("empid");
out.println(jempid);
int intempid=1223;
Connection conn=null;
String url="jdbc:mysql://localhost/employees";
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn=DriverManager.getConnection(url,"root","");
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from empdetails where empnum=jempid");
%>
It throws the following error
javax.servlet.ServletException: java.sql.SQLException: Unknown column 'jempid' in 'where clause