I have a search page with some text boxes (empno, ename, designation, deptno) where the user can enter some values to search. How to create a prepared statement for this search?
Ryan,
That won't work. SQL requires "and" rather than "," to separate commas.
The reason I didn't suggest this is it implies all of the fields were entered. If any are optional, Arunkumar needs to write logic to concatenate the relevant parts of the where clause.