I have an array of arrays like this -
[
['mark', 29],
['jolly', 28],
['john', 19],
['jim', 21],
.
.
.
]
I want to use this in where in clause so that column updates only when both columns name
and age
matches the subarray, tries to it like this:-
createQueryBuilder()
->update('table', 't')
->set('t.eligible', 1)
->where('t.name', 't.age' IN(:nameAgeArray))
->setParameter('nameAgeArray', $nameAgeArray)
->getQuery()
->execute();
But this way doesnt work. Is there any way to achieve this?
EDIT- Database structure -
name age eligible
mark 29 null
john 21 null
Max 20 null