Answer the question
In order to leave comments, you need to log in
How to correlate the result of the selection to the identifier from the where in (...) condition?
this is the request
SELECT field1, field2 FROM data WHERE user_id IN ('123', '680')
$result = [
123 => [
'field1' => 'foo3',
'field2' => 'bar4'
],
680 => [
'field1' => 'foo5',
'field2' => 'bar6'
]
];
Answer the question
In order to leave comments, you need to log in
make a request, then in php iterate over everything with the compilation of a new array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question