In one of my application I want to multi select the values in drop down and getting results from database
here I am using where in (for int ) in named query
for example :
I have values like 1,2 here when I pass the values in named query(in where) it takes only 1st given value(1)
Is there any other ways of how to pass this as a parameter?
Note that the parameter is not sanitized and since there are no single quotes included as part of the parameter value, then they will be interpreted as integers in the database.
EDIT: Corrected query example per @pturmel's correction.
My avoidance of using them is showing. If I'm writing a Named query and I run into something that can't be handled by any other means, I just use system.db.runPrepQuery().