I have a query like this:
$get_articles = "SELECT ..... WHERE c1.category_id = :main_category AND c2.category_id IN (:answers)...."
main_category is one number, so it is not a problem,
answers is a string that looks like this:
'71','101','145','43','95','45','113','139','73','65','119','149','55','63','151'
when I change :answers to $answers everything works fine, so obviously it's my problem.
I found info that I must bind each value. unfortunately number of elements in string and values is not constant. So is there any way to bindValue without doing it for each value separately?
Thanks!