Using db backup util to copy table to another database

#1
[eluser]louis w[/eluser]
But running into problems... Is it escaping the raw sql?

A Database Error Occurred

Error Number: 1064

Code:
$this->load->dbutil();

            // Get copy of data in local table
            
            $backup_config     = array(
                'tables'     => array('config')
                , 'format'    => 'txt'
                );
            $backup_data     =& $this->dbutil->backup($backup_config);

            // Connect to remote database
            $remote_db         = $this->load->database('web_db', TRUE);
            $remote_result     = $remote_db->query($backup_data);

I could select the data as a result object and iterate through it to run insert query for each row, but I am hoping to streamline it into one query. Maybe not possible.

#2
[eluser]pistolPete[/eluser]
Do local and remote database servers have the same MySQL version?

#3
[eluser]louis w[/eluser]
Yes, its actually the same machine. I think it's a problem with trying to execute multiple queries with the db class because it says there is an error occurring at or around the ;


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.