尝试了所有可能的选项,但这种关系不想工作。但是我得到了这个错误
CDbCommand无法执行SQL语句:SQLSTATE [23000]:完整性约束违规:1052列' id'顺序条款含糊不清。执行的SQL语句是:SELECT
t
。id
ASt0_c0
,t
。user_id
ASt0_c1
,t
。{ {1}} ASstore_id
,t0_c2
。t
ASstatus_id
,t0_c3
。t
ASbill_to_id
,{{1 } {。{1}} ASt0_c4
,t
。total
ASt0_c5
,t
。new
ASt0_c6
,t
。pay_method_id
ASt0_c7
,t
。created
ASt0_c8
,t
。updated
AS { {1}},t0_c9
。t
ASbilling_to_first
,t0_c10
。t
ASbilling_to_last
,t0_c11
。{{1 }t
,billing_to_fax
。t0_c12
ASt
,cc_last_four
。t0_c13
ASt
,check_image_id
。t0_c14
ASt
,comments
。t0_c15
ASt
,warning_id
。t0_c16
ASt
,{ {1}}。artworkRec
ASt0_c17
,t
。proofSent
ASt0_c18
,t
。proofApprvd
AS {{1 },t0_c19
。t
ASinHands
,t0_c20
。orderItems
ASid
,t1_c0
。orderItems
ASorder_id
,t1_c1
。orderItems
ASproduct_id
,t1_c2
。orderItems
ASfactory_id
,t1_c3
。{ {1}} ASorderItems
,qty
。t1_c4
ASorderItems
,price
。t1_c5
ASorderItems
,{{1 } {。{1}} ASlogo_name
,t1_c6
。orderItems
ASpo_number
,t1_c7
。orderItems
ASart_id
,t1_c8
。orderItems
ASart_status_id
,t1_c9
。orderItems
ASsend_proof
,t1_c10
。orderItems
AS { {1}},art_comments
。t1_c11
ASorderItems
FROMrush_option_id
t1_c12
LEFT OUTER JOINorderItems
special_instructions
ON({{ 1}}。t1_c13
=orderItems
。misc_charge_name
)WHERE(orderItems.po_number = 213)ORDER BY ID DESC LIMIT 10
我有一张桌子。 enter image description here
t1_c14
我很乐意提供任何帮助
答案 0 :(得分:0)
'排序'=>阵列( 'defaultOrder'=>'t.id DESC', ),