好吧,我想我做错了。这是我目前的收藏,但我需要按百分比订购。
array (
'_id' => new MongoId("505006de36314b4b27000001"),
'status' => 'pending',
'store_id' => new MongoId("505006de36314b4b27000000"),
'minspendone' => '50.00',
'cashbackone' => '1.50',
'percentageone'▼ => '0.03',
'minspendtwo' => '100.00',
'cashbacktwo' => '3.00',
'percentagetwo' => '0.03',
'minspendthree' => '',
'cashbackthree' => '',
'percentagethree' => '',
'minspendfour' => '',
'cashbackfour' => '',
'percentagefour' => '',
)
那么我最好将其更改为以下内容
array (
'_id' => new MongoId("505006de36314b4b27000001"),
'status' => 'pending',
'store_id' => new MongoId("505006de36314b4b27000000"),
'offers' => array(
'minspend' => '50.00',
'cashback' => '1.50',
'percentage' => '0.03'),
array(
'minspend' => '100.00',
'cashback' => '3.00',
'percentage' => '0.03'))
)
有人可以告诉我。