php codeigniter select results from foreach and save into an array -
i have php mysql query results following...
array ( [0] => stdclass object ( [id] => 52 [sku] => [name] => stone product 52 ) [1] => stdclass object ( [id] => 53 [sku] => [name] => stone product 53 ) . . . ) array ( [0] => stdclass object ( [id] => 12 [sku] => [name] => stone product 12 ) [1] => stdclass object ( [id] => 13 [sku] => [name] => stone product 13 ) . . . )
and want results below
array( [0] => stdclass object ( [id] => 52 [sku] => [name] => stone product 52 ) [1] => stdclass object ( [id] => 53 [sku] => [name] => stone product 53 ) [2] => stdclass object ( [id] => 12 [sku] => [name] => stone product 12 ) [3] => stdclass object ( [id] => 13 [sku] => [name] => stone product 13 )
in single array
please suggest me php code
you should not joining these results in php. use one query both sets of results, cut down on db reads.
Comments
Post a Comment