Home > Database > Mysql Tutorial > access 的多个left join 要加括号

access 的多个left join 要加括号

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:31:00
Original
1904 people have browsed it

string sql = "select a.orderId,a.UserName,b.CodeValue as Delivery ,a.DeliveryAddress,a.PhoneNum,c.CodeValue as Payment,d.CodeValue as OrderStatus,d.CodeValue as OrderStatusID,a.OrderTime,a.Merchant from (( m_Order a "; sql += " left join (

 string sql = "select  a.orderId,a.UserName,b.CodeValue as Delivery ,a.DeliveryAddress,a.PhoneNum,c.CodeValue as Payment,d.CodeValue as OrderStatus,d.CodeValue as OrderStatusID,a.OrderTime,a.Merchant from  (( m_Order a ";

            sql += " left join ( select CodeId,CodeValue from M_DefaultValue where TableId='Delivery') as b on a.Delivery =b.CodeId )";

            sql += " left join ( select CodeId,CodeValue from M_DefaultValue where TableId='Payment') as  c on a.Payment=c.CodeId )";

            sql += " left join ( select CodeId,CodeValue from M_DefaultValue where TableId='OrderStatu') as d on a.OrderStatus =d.CodeId ";

标记一下

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Access error using alias
From 1970-01-01 08:00:00
0
0
0
Single module access
From 1970-01-01 08:00:00
0
0
0
About Mac MAMP PRO deploy thinkphp5.1 access 404
From 1970-01-01 08:00:00
0
0
0
My access page reports 403
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template