Fetch Data From Database In Descending In CodeIgniter

Fetch Data From Database In Descending In CodeIgniter

To fetch data in descending order from the database in CodeIgniter you need to use the order_by() along with get()...

CodeIgniter Code Snippets - 3 months ago

Redirect domain to www on codeigniter ?

Redirect domain to www on codeigniter ?

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...

CodeIgniter Code Snippets - 5 years ago

Codeigniter get controller,Action name in helper

Codeigniter get controller,Action name in helper

$ci =& get_instance(); // instance of the CI super variable $ci->router->fetch_class(); // for controller name $ci->router->fetch_method(); // for method name

CodeIgniter Code Snippets - 6 years ago

How to get Controller, Action name in CodeIgniter ?

How to get Controller, Action name in CodeIgniter ?

$this->router->fetch_class(); // class = controller $this->router->fetch_method(); // action = method

CodeIgniter Code Snippets - 6 years ago