时间:2021-07-01 10:21:17 帮助过:22人阅读
array('id','orderNo','date','money','memo','state','_type'=>'LEFT'), 'client' => array('clientName','_on'=>'order.client_id=client.id','_type'=>'RIGHT'), 'user' => array('userName','_on'=>'order.user_id=user.id'), ); }?>
$Model = D("OrderView"); $result = $Model->select(); p($result);die;
SELECT order.id AS id,order.orderNo AS orderNo,order.date AS date,order.money AS money,order.memo AS memo,order.state AS state,client.clientName AS clientName,user.userName AS userName FROM or_order order LEFT JOIN or_client client ON order.client_id=client.id RIGHT JOIN or_user user ON order.user_id=user.id
已在config文件中加了自动表前缀
生成的sql语句执行有什么问题?
生成的sql语句执行有什么问题?
表的别名不要用order,
order是关键字~
表的别名不要用order,
order是关键字~