From 833b111afccb2d6ee4fb8a411064d993e37ecbf2 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 23 Feb 2013 02:54:41 +0000 Subject: [PATCH] Fix the sql query backup tool. Tested with postgres and sqlite. --- app/sql_query/sql_backup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/sql_query/sql_backup.php b/app/sql_query/sql_backup.php index 18665a5860..5040f163a4 100644 --- a/app/sql_query/sql_backup.php +++ b/app/sql_query/sql_backup.php @@ -63,7 +63,7 @@ else { $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { - $table_name = $row[0]; + $table_name = $row['name']; //get the table data $sql = "select * from $table_name";