I have multiple ID's stored in a variable. This array can become long (+400 ID's). How do I fetch the data from these ID's in MySQL (PDO)?
I could do it via this:
"select * from info WHERE `id` IN ('1,2,3,4,5')"
But that's unsafe (SQL injection) and maybe not performant. Any suggestions to handle this problem?