I have a stored procedure in a sql server 2008 db.
This stored procedure takes a parameter that is a list of max 5 comma separated integer values. This string is passed through a php sript and formatted like this:
01,02,03,14,15
These values should go in this table:
Id | Type id
-------------
1 | 1
1 | 2
1 | 3
1 | 14
1 | 15
...where id is the same and type id is one of the comma separated values.
Obviously, I could have a string like "01,02,03" with only 3 values. So I need a way to insert only 3 rows in the above table resulting in:
Id | Type id
-------------
1 | 1
1 | 2
1 | 3
I could modify either the php script or the stored procedure, so I'm open to all kinds of suggestion.