I have this question about the MySqlParameter from the .NET connector.
I have this query:
SELECT * FROM table WHERE id IN (@parameter)
You have a few options here (in order of preference):
The data has to come from somewhere: either your database, user action, or machine-generated source.
If it's created by the user, add it to a separate table on each individual user action, and then use a sub query.
An example of this is a shopping cart. A user might select several items to purchase. Rather than keep these in the app and need to add all the items to an order in one go when they check out, add each item to a table in the db as the user selects or changes it.
The definitive (and I mean definitive) work on the subject is here:
http://www.sommarskog.se/arrays-in-sql.html
The article long, but in a good way. The author is a sql server expert, but the concepts on the whole apply to MySQL as well.