[eluser]johnwbaxter[/eluser]
I have a controller that loads a model and runs the function in the model.
This is my model:
Code:
function getorders()
{
$order_cust_id = $this->session->userdata['id'];
log_message('info', $order_cust_id);
$this->db->select('orderid, cust_id, status, price, timestamp');
log_message('info', 'The select part has run');
$this->db->from('orders');
log_message('info', 'The from part has run');
$this->db->where('cust_id', $order_cust_id);
log_message('info', 'The where part has run');
return $this->db->get();
log_message('debug', $this->db->last_query());
}
From looking in the log, the last message that is logged is "The where part has run" and then it loads the next part of the controller which is loading a view. There are no errors inbetween the last message shown and loading the view.
The query is obviously not run as the "this->db->last_query is not logged but there is no error in the log!
What in earth is going on!
If anyone can help they would be saving me from spiralling into lunacy...