joostvanveen / build-a-cms-with-codeigniter

Source code for the Tutsplus course 'Build a CMS with Codeigniter'
53 stars 55 forks source link

Issue in MY_Model #11

Closed spike04 closed 9 years ago

spike04 commented 9 years ago

if (!count($this->db->ar_orderby)) { $this->db->order_by($this->_order_by); }

The following code cannot be run in the progress. Please have a look. And if possible guide with a alternative since ar_orderby cannot be used anymore

joostvanveen commented 9 years ago

It's been replaced by $this->db->qb_orderby, but that's a protected property. You cannot use it anymore. However, $this->db->order_by now adds to order by instead of replace it, so you do not need this ugly workaround anymore. Instead, you should be fine you doing:

$this->db->order_by($this->_order_by);