Welcome Guest, Not a member yet? Register   Sign In
Call to undefined method CI_DB_mysql_driver::row()
#2

[eluser]m4rw3r[/eluser]
You have to call get() to get the value:
Code:
function edit($tutID = NULL) {
    if ( ! isset($tutID) OR ! is_numeric($tutID)) {
        redirect('/admin/tutorial/overview');
    }
    $this->db->where('tutId', $tutID);
    $this->db->select('tutorial');
    $query = $this->db->get('tablename');
    $data['data'] = $query->row();
}
Select() only returns the db object, to enable chaining. But get() and get_where() return DB_result objects which have row().


Messages In This Thread
Call to undefined method CI_DB_mysql_driver::row() - by El Forum - 09-11-2008, 07:39 AM
Call to undefined method CI_DB_mysql_driver::row() - by El Forum - 09-11-2008, 07:46 AM
Call to undefined method CI_DB_mysql_driver::row() - by El Forum - 09-11-2008, 07:50 AM
Call to undefined method CI_DB_mysql_driver::row() - by El Forum - 09-11-2008, 07:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB