THINKPHP关联模型怎么用
现在有两张表,一张商品订单表,一张订单商品明细表。一条订单可以有很多条商品信息,我想问问大神们怎么用THINKPHP的关联模型把他们连接起来,其中orderid是两个表的...
现在有两张表,一张商品订单表,一张订单商品明细表。一条订单可以有很多条商品信息,我想问问大神们怎么用THINKPHP的关联模型把他们连接起来,其中orderid是两个表的关联。
我是这样写的,可是出不来
出来是这样的
array(2) { [0] => array(33) { ["id"] => string(2) "38" ["dis_id"] => NULL ["shopid"] => NULL ["orderid"] => string(12) "275533125170" ["memberid"] => string(1) "0" ["realname"] => string(6) "杨蓓" ["openid"] => string(28) "oiFJfwvzyP6xVee9fzdJRbcHp11g" ["addr"] => string(43) "双流白家黄荆路11号省教科所2-1-6" ["province"] => string(9) "四川省" ["country"] => string(0) "" ["city"] => string(9) "成都市" ["ordertime"] => string(19) "2015-12-15 18:12:44" ["totalamount"] => string(1) "1" ["totalprice"] => string(6) "108.00" ["updatetime"] => string(19) "2015-12-17 11:05:13" ["status"] => string(1) "4" ["comment"] => string(0) "" ["express"] => string(4) "0.00" ["delivery_datetime"] => string(1) "0" ["delivery_status"] => string(1) "1" ["weixin_id"] => string(1) "0" ["company"] => string(1) "0" ["user_head_img"] => NULL ["check_team_owner"] => string(1) "0" ["tuan_orderid"] => NULL ["arrival_type"] => string(1) "3" ["check_buying"] => NULL ["buying_dead_time"] => NULL ["refund_memo"] => NULL ["out_refund_no"] => NULL ["virtual"] => NULL ["arr"] => array(0) { } } [1] => array(33) { ["id"] => string(2) "39" ["dis_id"] => NULL ["shopid"] => NULL ["orderid"] => string(12) "348060725040" ["memberid"] => string(1) "0" ["realname"] => string(6) "zhaopx" ["openid"] => string(28) "oiFJfwpn_owTIeR7dSk_Rvrymnb4" ["addr"] => string(17) "大石西路54号" ["province"] => string(9) "四川省" ["country"] => string(0) "" ["city"] => string(9) "成都市" ["ordertime"] => string(19) "2015-12-16 14:06:16" ["totalamount"] => string(1) "1" ["totalprice"] => string(5) "39.80" ["updatetime"] => string(19) "2015-12-18 10:28:05" ["status"] => string(1) "4" ["comment"] => string(0) "" ["express"] => string(4) "0.00" ["delivery_datetime"] => string(1) "0" ["delivery_status"] => string(1) "0" ["weixin_id"] => string(1) "0" ["company"] => string(1) "0" ["user_head_img"] => NULL ["check_team_owner"] => string(1) "4" ["tuan_orderid"] => NULL ["arrival_type"] => string(1) "3" ["check_buying"] => string(1) "0" ["buying_dead_time"] => string(19) "0000-00-00 00:00:00" ["refund_memo"] => NULL ["out_refund_no"] => NULL ["virtual"] => NULL ["arr"] => array(0) { } }} 展开
我是这样写的,可是出不来
出来是这样的
array(2) { [0] => array(33) { ["id"] => string(2) "38" ["dis_id"] => NULL ["shopid"] => NULL ["orderid"] => string(12) "275533125170" ["memberid"] => string(1) "0" ["realname"] => string(6) "杨蓓" ["openid"] => string(28) "oiFJfwvzyP6xVee9fzdJRbcHp11g" ["addr"] => string(43) "双流白家黄荆路11号省教科所2-1-6" ["province"] => string(9) "四川省" ["country"] => string(0) "" ["city"] => string(9) "成都市" ["ordertime"] => string(19) "2015-12-15 18:12:44" ["totalamount"] => string(1) "1" ["totalprice"] => string(6) "108.00" ["updatetime"] => string(19) "2015-12-17 11:05:13" ["status"] => string(1) "4" ["comment"] => string(0) "" ["express"] => string(4) "0.00" ["delivery_datetime"] => string(1) "0" ["delivery_status"] => string(1) "1" ["weixin_id"] => string(1) "0" ["company"] => string(1) "0" ["user_head_img"] => NULL ["check_team_owner"] => string(1) "0" ["tuan_orderid"] => NULL ["arrival_type"] => string(1) "3" ["check_buying"] => NULL ["buying_dead_time"] => NULL ["refund_memo"] => NULL ["out_refund_no"] => NULL ["virtual"] => NULL ["arr"] => array(0) { } } [1] => array(33) { ["id"] => string(2) "39" ["dis_id"] => NULL ["shopid"] => NULL ["orderid"] => string(12) "348060725040" ["memberid"] => string(1) "0" ["realname"] => string(6) "zhaopx" ["openid"] => string(28) "oiFJfwpn_owTIeR7dSk_Rvrymnb4" ["addr"] => string(17) "大石西路54号" ["province"] => string(9) "四川省" ["country"] => string(0) "" ["city"] => string(9) "成都市" ["ordertime"] => string(19) "2015-12-16 14:06:16" ["totalamount"] => string(1) "1" ["totalprice"] => string(5) "39.80" ["updatetime"] => string(19) "2015-12-18 10:28:05" ["status"] => string(1) "4" ["comment"] => string(0) "" ["express"] => string(4) "0.00" ["delivery_datetime"] => string(1) "0" ["delivery_status"] => string(1) "0" ["weixin_id"] => string(1) "0" ["company"] => string(1) "0" ["user_head_img"] => NULL ["check_team_owner"] => string(1) "4" ["tuan_orderid"] => NULL ["arrival_type"] => string(1) "3" ["check_buying"] => string(1) "0" ["buying_dead_time"] => string(19) "0000-00-00 00:00:00" ["refund_memo"] => NULL ["out_refund_no"] => NULL ["virtual"] => NULL ["arr"] => array(0) { } }} 展开
1个回答
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询