Hello i looked in many fora and on many documentation websites but i can't find a way to use the in operator in a mysql query without having an error.
- select name from users where id in (?)
When i parameterize the query like that i get an error saying i don't use the right odbctype. i use int but of course most of the time it's a comma seperated string. If i use the string odbctype i get the same error.
- "select name from users where id in ("+ ids+")"
I get what i want but there are occasions where i want to work with those query values, for instance use them in another query, but i can't the only thing i can do is to output them.
i could do a loop of the ids but i want to keep the number of queries as low as possible.
Any light on this problem is very welcome.