To fetch data in descending order from the database in CodeIgniter you need to use the order_by() along with get() method. Below is the sample code.
1 |
return $this->db->order_by('column_name', 'desc')->get('table_name')->result(); |
Full Stack LAMP, MEAN, DevOps Consultant
To fetch data in descending order from the database in CodeIgniter you need to use the order_by() along with get() method. Below is the sample code.
1 |
return $this->db->order_by('column_name', 'desc')->get('table_name')->result(); |
1 2 3 4 5 6 7 8 9 10 |
RewriteEngine On #This bit rewrites your host name to include www RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,NC,L] #This bit does the codeigniter magic RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] |
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.
1 2 3 |
$ci =& get_instance(); // instance of the CI super variable $ci->router->fetch_class(); // for controller name $ci->router->fetch_method(); // for method name |
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.
1 2 |
$this->router->fetch_class(); // class = controller $this->router->fetch_method(); // action = method |
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.