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.
'SELECT * FROM Employ where number = ' + parseInt(val, 10) + ';'
For example, if val is "10" then this will end up building the string:
val
"10"
"SELECT * FROM Employ where number = 10;"