Ejemplo n.º 1
0
 public function dump($export_file_location, $table_prefix = '')
 {
     $eol = $this->eol;
     $this->dump_file = DumpFile::create($export_file_location);
     $this->dump_file->write('-- Generation time: ' . date('r') . $eol);
     $this->dump_file->write('-- Host: ' . $this->db->host . $eol);
     $this->dump_file->write('-- DB name: ' . $this->db->name . $eol);
     $this->dump_file->write("/*!40030 SET NAMES UTF8 */;{$eol}{$eol}");
     $tables = $this->get_tables($table_prefix);
     foreach ($tables as $table) {
         $this->dump_table($table);
     }
     unset($this->dump_file);
 }