Welcome Guest, Not a member yet? Register   Sign In
Database Utility - Backups Not Working with MySQLi
#5

[eluser]Unknown[/eluser]
Probably you would face the same problem than me if you are trying to export BIG tables. Here you are a quick workaround.

Replace this...

Code:
// Grab all the data from the current table
$query = $this->db->query("SELECT * FROM $table");

if ($query->num_rows() == 0)
{
continue;
}

with this...

Code:
// Grab all the data from the current table - in slices of 1000 records
// Workaround for BIG tables
$slice = 0;
$query = $this->db->query("SELECT * FROM $table LIMIT $slice, 1000;");

while ($query->num_rows() !== 0)
{

... and then, replace this...

Code:
$output .= $newline.$newline;
}

with this...

Code:
$output .= $newline.$newline;

$slice = $slice + 1000;
$query = $this->db->query("SELECT * FROM $table LIMIT $slice, 1000;");
}


Messages In This Thread
Database Utility - Backups Not Working with MySQLi - by El Forum - 07-20-2011, 05:07 PM
Database Utility - Backups Not Working with MySQLi - by El Forum - 02-14-2012, 01:08 AM
Database Utility - Backups Not Working with MySQLi - by El Forum - 01-11-2013, 09:26 PM
Database Utility - Backups Not Working with MySQLi - by El Forum - 10-25-2014, 12:25 AM
Database Utility - Backups Not Working with MySQLi - by El Forum - 10-25-2014, 01:36 AM
Database Utility - Backups Not Working with MySQLi - by El Forum - 10-27-2014, 04:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB