Php sıralama benim için çalışmak için görünmüyor

0 Cevap php

Benim tablo başlığında bir çapa etiketi var ve bir denetleyici yöntemini çağırır. Bu kullanmış,

<th width="15%" align="center" class="grid_header">Category
  <?=anchor('customer/basic/'.$keyword.'/Category/'.$this->customerlist->
 fieldTest('dbCategory', $sort_field, $sort_order), 'Category')?></th>

ve ben, bu yöntemi var

 function Basic($keyword = $this->input->post('keyword'),$sort_field = 'default_field',$sort_order = 'default_order')
    {
        //Using form input to determine what fields to search in the table with $keyword

        $section = $this->input->post('section');
        //Start prepping the query
        foreach($section as $key => $tbl_field) 
        {
            //For first field generate 'like' statement, the rest get 'or_like'
            if($key == 0) {$this->db->like($tbl_field, $keyword); }
            if($key > 0) { $this->db->or_like($tbl_field, $keyword); }
        }
        //Perform the query, and set the results as an array
        $query = $this->db->get('tbl_customer');
        $result = $query->result_array;
        //Sort the Array
        $result = $this->customerlist->orderBy($result, $sort_field, $sort_order);
        $data['customerdata'] = (object)$result;  //I like to work with objects in my views
        print_r($data['customerdata']);
        //Load the view with the sorted search results
        $data['keyword']=$keyword;        //
        $data['sort_field']=$sort_field;  // send these to the view for sorting links
        $data['sort_order']=$sort_order;   //
        $this->load->view('customerdetails', $data);
   } 

Ben doğrultusunda Parse error: syntax error, unexpected T_VARIABLE hatası alıyorum

function Basic($keyword = $this->input->post('keyword'),$sort_field = 
                    'default_field',$sort_order = 'default_order')

Herhangi bir öneri ...

EDIT: Source: http://codeigniter.com/forums/viewthread/112696/#571876

0 Cevap