Welcome Guest, Not a member yet? Register   Sign In
dbutil() produces database error for MySQL


I am getting an error

A Database Error Occurred

Unsupported feature of the database platform you are using

while running the following code

// Load the DB utility class
  //=== set preferences
  $prefs = array(
                'tables'      => array('mytable'),  // Array of tables to backup.
                'ignore'      => array(),           // List of tables to omit from the backup
                'format'      => 'gzip',            // gzip, zip, txt
                'filename'    => 'mybackup.sql',    // File name - NEEDED ONLY WITH ZIP FILES
                'add_drop'    => TRUE,              // Whether to add DROP TABLE statements to backup file
                'add_insert'  => TRUE,              // Whether to add INSERT data to backup file
                'newline'     => "\n"               // Newline character used in backup file
  // Backup your entire database and assign it to a variable
  $backup = $this->dbutil->backup($prefs);

  // Load the file helper and write the file to your server
  write_file($this->data['gz_folder'] . '/mybackup.gz', $backup);

  // Load the download helper and send the file to your desktop
  force_download('mybackup.gz', $backup);

dbutil seems to point to the correct database. So I don't know, what I'm missing here.


I find out that dbutil->backup() is not supported when using the mysqli extension. It runs fin with mysql extension. Why that? Confusedmirk:

Theme © iAndrew 2016 - Forum software by © MyBB