开发者

How to set order of columns where joins are included in select in Zend Framework

开发者 https://www.devze.com 2023-01-14 20:26 出处:网络
Do you know if in case as follows there is any way to set sequence of columns? which is first, which one is second etc?

Do you know if in case as follows there is any way to set sequence of columns? which is first, which one is second etc?

$select->from(array('e' => 'equipment'), array(
                        'ID_equipment',
                        'nr_in',
     开发者_开发知识库                   'equipment_type_ID_equipment_type',
                        'serial_number',
                        'barcode',
                        'sys_create_date',
                        'sys_deleted',  
                        'status',       
                        'computer_unit_idcomputer_unit',    
                        'room_ID_room', 
                        'action_ID_action',     
                        'invoice_id_invoice',   
                        'quara',
                        'description'
    ));

$select->join(array('et' => 'equipment_type'), 'e.equipment_type_ID_equipment_type = et.ID_equipment_type', array('equipment_type_name'));
$select->join(array('i' => 'invoice'), 'i.id_invoice = e.invoice_id_invoice', array('invoice_number'));

These columns which come from joins are placed at the end of all columns and I would like to change placement of this.

Thank you in advance for any help.

Kind Regards,


initially it seems that placing:

'equipment_type_ID_equipment_type as equipment_type_name'

sets column in proper manner (after nr_in)

0

精彩评论

暂无评论...
验证码 换一张
取 消