How can I Code A multiple search?

I got a Categories table and people need to say: (Yes, my code working by words :) )

'list books and pencils'

But Another day, they want to say:

'list books, pencils, notebooks and papers'

I'm using stored procedures at mssql. Or I don't want to use 4 parameters, and limit the user. I will use this solution at many pages so I'm searching for perfect solution.

Thanks..

edit:

I don't want to parse it in stored procedure for performance and security, but if it is the only way, say me, I can understand. :)

Upvotes: 2

Views: 111

Answers (1)

Junaid
Junaid

Reputation: 1755

pass the values in as xml or string to the stored procedure and have some logic in the stored procedure to parse the values.

Upvotes: 1

Related Questions