[eluser]Peter Bowen[/eluser]
Greetings and thanks in advance for your attention to my problem.
I'm backing up selected tables from my database and saving them to individual files (there is a good reason behind this).
Code:
$tables = array('a_table','another_table_etc');
foreach($tables as $table){
//set the preferences and choose the table
$prefs = array(
'tables' => array($table),
'format' => 'txt',
'add_drop' => TRUE,
'add_insert' => TRUE,
'newline' => "\n"
);
$backup = $this->dbutil->backup($prefs);
//write to file
write_file("$directory$table.sql", $backup);
}
I get this error: Error Number: 2008 MySQL client ran out of memory.
I've tried the following without any luck:
1. increasing the memory limit for the script;
2. $this->db->save_queries = false;
3. turning caching on and off;
I'd appreciate your thoughts on the matter.
Thanks
Pete