Call to undefined method CI_DB_mysql_driver::row() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Call to undefined method CI_DB_mysql_driver::row() (/showthread.php?tid=1999) |
Call to undefined method CI_DB_mysql_driver::row() - El Forum - 07-11-2007 [eluser]MikePearce[/eluser] ------- EDIT ----------- I am such an a$$ - I forgot: Code: $this->db->get(); 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 { 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 Call to undefined method CI_DB_mysql_driver::row() - El Forum - 07-11-2007 [eluser]luisjose[/eluser] Maybe is that way: $row = $q->result()->row(); Call to undefined method CI_DB_mysql_driver::row() - El Forum - 07-11-2007 [eluser]MikePearce[/eluser] Hi Luisjose, Thanks for the reply, what I actually did was prepared the SQL statement using ActiveRecord and then didn't actually *execute* the query to get the DB object. Once you've got the db object, then you can extract the result. I *was* being a dumba$$ afterall! Mike |