Save all the records with a value in an array
Posted: 2016-03-14 23:33
Hi guys, here is my problem:
I have a table1: id, name, color, size;
And I need to save all the id's with size=3 in an array: $ids=array(list of all the id of register with size=3);
Then Use the array to make a query, for all the items of the array, example: $registro = sql("select * from `table1` where `id`='$ids[]' limit 1", $eo);
How can do that?
Thanks.
I have a table1: id, name, color, size;
And I need to save all the id's with size=3 in an array: $ids=array(list of all the id of register with size=3);
Then Use the array to make a query, for all the items of the array, example: $registro = sql("select * from `table1` where `id`='$ids[]' limit 1", $eo);
How can do that?
Thanks.