I need to store the results of a series of different queries in mysql loop in one array to compare it with another and see the differences and delete what is left over.
Is there any way to do it?
At the moment I do not have any code except the query to mysql and the loop that I do with a foreach and in each loop changes the parameters of the search automatically with a Cartesian product.
if it's any good I put the code.
$UpTallicolor = CartesianProduct(array('tallas'=> $_POST['tallas'], 'color'=> $_POST['colores']));
foreach($UpTallicolor as $DUptallicolor) {
$CExisteArt = Consulta_Dinamica("Simple","*","Codigos","'que' = 'Codigo' AND 'id' = '".$_POST["nuevo"]."' AND '1'='".$DUptallicolor['tallas']."' AND '2'='".$DUptallicolor['color']."' ");
} //cierro el foreach
The result would have to give me everything that is not in the generated array of the Cartesian product must be deleted from mysql.
I think that to compare the two resulting arrays I have to use a array_diff_assoc
, would it be the form? Or just with array_diff
?
A thousand thanks to everyone for the help