[eluser]johnwbaxter[/eluser]
I have in my model:
$this->db->select('orderid');
$this->db->from('orders');
$this->db->where('cust_id =', $cust_id);
$this->db->order_by('orderid', 'DESC');
$this->db->limit(1);
$lastorder = $this->db->get();
return $lastorder;
Then in my controller i have:
$orderid = $this->ordermodel->retorder();
And then i have a line of code that tries to use the $orderid variable to populate the value of a form field.
In my log i have this error:
Severity: Notice --> Object of class CI_DB_mysql_result to string conversion /var/www/vhosts/mysite.com/httpdocs/system/helpers/form_helper.php 360
Any ideas anyone?!
I'm totally stumped. I think it's returning an object instead of a value but i'm not sure why or how to access it if it is in this scenario.