grocery CRUD order_by

分享于 

1分钟阅读

Web开发

  繁體

order_by


void order_by(mixed $order_by [, string $direction] )


快速描述:列表排序(与codeigniter相同)

例如:


function customers_example() {
 $crud = new grocery_CRUD();
 
 $crud->set_table('customers')
 ->set_subject('Customer')
 ->columns('customerName','contactLastName','creditLimit');
 
 $crud->fields('customerName','contactLastName','city','creditLimit');
 
 $crud->order_by('creditLimit','desc');
 
 $output = $crud->render();
 
 $this->_example_output($output);
}



ord  CRUD  groc  Grocery Crud