CodeIgniter Forums
MySQLi backup utilitiy - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: MySQLi backup utilitiy (/showthread.php?tid=5646)



MySQLi backup utilitiy - El Forum - 01-29-2008

[eluser]Derek Allard[/eluser]
Seppo recently pointed out that the MySQLi backup utility relied on MySQL functions. After mcuh searching, I really can't find a suitable alternative. I've changed the docs to represent that the backup utility is only available in MySQL, but I would really like it back into CI core, and to that extent, I'd happily welcome any code contributions if you can figure out a clever way to get around the lack of mysqli_fetch_field() support.


MySQLi backup utilitiy - El Forum - 01-29-2008

[eluser]John Fuller[/eluser]
Lolcode has a pretty robust method.

Code:
HAI
CAN HAS DB BACKUP?
    D00d! I AM IN UR DATABASE BACKING UP UR TABLEZZ!!1!1!11
KTHXBYE



MySQLi backup utilitiy - El Forum - 02-19-2010

[eluser]Ch. Land[/eluser]
I know that this thread is OLD but I needed the backup-function and as 1.7.2 is still missing that function I did some research... looks like this fixes the issue:

Code:
while ($field = mysqli_fetch_field($query->result_id)) {

    $is_int[$i]    = in_array((int)$field->type,array(1,2,3,8,9));
                            
    // Create a string of field names
    $field_str .= '`'.$field->name.'`, ';
    $i++;

}

At least for my test-databases it produced the same result as the mysql version.


MySQLi backup utilitiy - El Forum - 10-14-2013

[eluser]robertGM[/eluser]
Im looking to for mysqli backup any ideas how can i do this ?


Thanks