In my web application, I want to retrieve data from database based on the value that is passed to the function. I wrote the query as follows.
The error is coming as your query is getting formed as
SELECT * FROM Employ where number = parseInt(val);
I dont know which DB you are using but no DB will understand parseInt.
What you can do is use a variable say temp and store the value of parseInt(val) in temp variable and make the query as
SELECT * FROM Employ where number = temp;