$staff = DB::select()->from('staff') ->order_by('name_last', 'asc') ->order_by('name_first', 'asc') ->order_by('name_middle', 'asc') ->execute(); print_r($staff);
Fuel\Core\Database_Result_Cached Object ( [_query:protected] => SELECT * FROM `staff` ORDER BY `name_last` ASC, `name_first` ASC, `name_middle` ASC [_result:protected] => Array ( [0] => Array ( [id] => 1 [name_first] => Ftest [name_middle] => Mtest [name_last] => Ltest [email] => email@example.com [dob] => 1980-12-25 [address_line1] => Street Name [address_line2] => Village Name [address_line3] => TOWNSVILLE [address_line4] => [address_postcode] => SW1A 1AA etc ) ) [_total_rows:protected] => 1 [_current_row:protected] => 0 [_as_object:protected] => )
$staff = DB::select()->from('staff') ->order_by('name_last', 'asc') ->order_by('name_first', 'asc') ->order_by('name_middle', 'asc'); $staff->execute(); print_r($staff);
Fuel\Core\Database_Query_Builder_Select Object ( [_select:protected] => Array ( ) [_distinct:protected] => [_from:protected] => Array ( [0] => staff ) [_join:protected] => Array ( ) [_group_by:protected] => Array ( ) [_having:protected] => Array ( ) [_offset:protected] => [_last_join:protected] => [_where:protected] => Array ( ) [_order_by:protected] => Array ( [0] => Array ( [0] => name_last [1] => asc ) [1] => Array ( [0] => name_first [1] => asc ) [2] => Array ( [0] => name_middle [1] => asc ) ) [_limit:protected] => [_type:protected] => 1 [_lifetime:protected] => [_sql:protected] => 1 [_parameters:protected] => Array ( ) [_as_object:protected] => )
$staff = DB::select()->from('staff')
->order_by('name_last', 'asc')
->order_by('name_first', 'asc')
->order_by('name_middle', 'asc');
$staff->execute();
print_r($staff);
$query = DB::select()->from('staff')
->order_by('name_last', 'asc')
->order_by('name_first', 'asc')
->order_by('name_middle', 'asc');
$staff = $query->execute();
print_r($staff);
It looks like you're new here. If you want to get involved, click one of these buttons!