Fix backup_data method for Firebird driver

This commit is contained in:
Timothy Warren 2012-02-28 20:53:16 -05:00
parent 105a086603
commit 642b17b28f
4 changed files with 4 additions and 6 deletions

View File

@ -365,11 +365,11 @@ SQL;
$output_sql = ''; $output_sql = '';
// Get the data for each object // Get the data for each object
foreach($table as $r) foreach($tables as $t)
{ {
$sql = 'SELECT * FROM "'.$r['name'].'"'; $sql = 'SELECT * FROM "'.trim($t).'"';
$res = $this->query($sql); $res = $this->query($sql);
$obj_res = $res->fetchAll(PDO::FETCH_ASSOC); $obj_res = $this->fetchAll(PDO::FETCH_ASSOC);
unset($res); unset($res);
@ -389,7 +389,7 @@ SQL;
$row[$i] = (is_numeric($row[$i])) ? $row[$i] : $this->quote($row[$i]); $row[$i] = (is_numeric($row[$i])) ? $row[$i] : $this->quote($row[$i]);
} }
$row_string = 'INSERT INTO "'.$r['name'].'" ("'.implode('","', $columns).'") VALUES ('.implode(',', $row).');'; $row_string = 'INSERT INTO "'.trim($t).'" ("'.implode('","', $columns).'") VALUES ('.implode(',', $row).');';
unset($row); unset($row);

View File

@ -118,8 +118,6 @@ SQL;
function TestDeleteTable() function TestDeleteTable()
{ {
?><pre><?= $this->db->backup_data(); ?></pre><?php
//Attempt to delete the table //Attempt to delete the table
$sql = $this->db->manip->delete_table('create_test'); $sql = $this->db->manip->delete_table('create_test');
$this->db->query($sql); $this->db->query($sql);

Binary file not shown.

Binary file not shown.