Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to undefined method Artist::_ci_assign_to_models()

hi, I am creating a page to force download a csv file. I have the error in the topic when i use the following codes.
// Load the DB utility class

        $query = $this->db->query("SELECT first_name, last_name, addr_line1, addr_line2, city, state, zipcode, phone FROM ".$this->config->item('users_tbl'));

        $delimiter = ",";
        $newline = "\r\n";

            $backup =& $this->dbutil->csv_from_result($query, $delimiter, $newline);
            // Load the download helper and send the file to your desktop

            force_download('user_address.csv', $backup);

Any help on this matter would be greatly appreciated. ThanksSmile

Are there any fixes for this?

It seems that this is causing the problem

// Load the DB utility class

I noticed this in the documentation
"In order to initialize the Utility class, your database driver must already be running, since the utilities class relies on it."

What does that mean and how to check if my database driver is running?

Thanks for any help on this. BTW I am running 1.6

Theme © iAndrew 2016 - Forum software by © MyBB