[eluser]MikePearce[/eluser]
------- EDIT -----------
I am such an a$$ - I forgot:
after the AR call.
Sorry to waste your time!
------- EDIT ---------
Hi all,
Perhaps I am being a dumbass, but I'm getting this error:
Quote:Call to undefined method CI_DB_mysql_driver::row()
and this is the model:
Code:
class Portfolio extends Model {
var $shop_id; // Contains the ID for the Whats in the Shop car.
function Portfolio() {
parent::Model();
$this->load->database();
}
function getShop(){
if (empty($this->shop_id)){
$q = $this->db->select('p_id')->from('type_lkp')->where('t_id',3)->orderby('p_id', 'desc')->limit(1);
$row = $q->row();
$this->shop_id = $row->name;
}
return $this->shop_id;
}
function getShopCopy() {
$q = $this->db->select('desc')->from('portfolio')->where('id', $this->getShop());
$r = $q->row();
return $r->desc;
}
}
The error is on this line: $row = $q->row();
I can't see what the problem is - am I doing something very stupid?
Thanks in advance,
Mike