Search
 
SCRIPT & CODE EXAMPLE
 

PHP

applying multiple order by in codeigniter

$this->db->from($this->table_name);
$this->db->order_by("column1 asc,column2 desc");
$query = $this->db->get(); 
return $query->result();
Comment

PREVIOUS NEXT
Code Example
Php :: how to retrieve data from database using select option in laravel 
Php :: Modes of file reading php 
Php :: laravel collection find duplicates 
Php :: acf get field 
Php :: php absolute value 
Php :: get current time in php 
Php :: php checking if array is multidimensional or not 
Php :: laravel get image extension 
Php :: how to use plugin shortcode in wordpress template 
Php :: php try catch 
Php :: laravel duplicate row 
Php :: datetime validation in laravel 
Php :: left join laravel 
Php :: how to use a session in blade 
Php :: laravel store method 
Php :: migrate specific migration file laravel 
Php :: laravel event generate 
Php :: string to array in php 
Php :: laravel eloquent select one column in array 
Php :: symfony see all make commands 
Php :: composer require no cache 
Php :: change the php version in linux 
Php :: dump php array into javascript array 
Php :: laravel rename table 
Php :: php curl Content-Length 
Php :: laravel add auto increment 
Php :: Allowed memory size of 1610612736 bytes exhausted 4096 
Php :: varchar max length define laravel migration 
Php :: laravel auth 6 
Php :: convert an integer to a string in PHP 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =