I have this question about the MySqlParameter from the .NET connector.
I have this query:
SELECT * FROM table WHERE id IN (@parameter)
you are going to have to iterate over your array and create the list yourself
// no parameters
var sb = new StringBuilder();
for(int i=0;i0) {sb.Length-=1;}
string sql = "SELECT * FROM table WHERE id IN (" + sb.ToString() + ")";
UPDATE: Having thought more about this I'll go back to my original answer (below) which is to use parameters. Optimisations of built queries and whatever the database engine can muster are up to you.
// no parameters
var sb = new StringBuilder();
for(int i=0;i0) {sb.Length-=1;}
string sql = "SELECT * FROM table WHERE id IN (" + sb.ToString() + ")";