Ask about php tp5 processing the result set of select
骄阳似火
骄阳似火 2019-06-27 10:58:03
0
2
1239

$wamResult = WpAdsupplierMerchant::where('cate_id',$cateId)->field('merchant_id')->select();//All store ids

Hello, I would like to The IDs of all collections are stored in a variable, for example: $ids = [12,21,23,32,11];

Now the result of $wamResult is:

[data: protected] => Array

(

[merchant_id] => 345

)

[origin:protected] => Array

(

[merchant_id] => 345

)

[relation:protected] => ; Array

(

)

The current problem is I don’t know how to deal with $wamResult,

骄阳似火
骄阳似火

reply all(1)
米粒

is like this, for example: $ids = "12,21,23,32,11";

  • reply Got it, using this method to query is an array collection $wamResult = WpAdsupplierMerchant::where('cate_id',$cateId)->column('merchant_id');
    骄阳似火 author 2019-06-27 11:16:10
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template