Fix the sql query backup tool so that it will work for mysql.

This commit is contained in:
Mark Crane 2013-06-16 00:24:16 +00:00
parent 7949e3849e
commit 06cccee647
1 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -69,7 +69,8 @@ else {
$prep_statement->execute(); $prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) { foreach ($result as &$row) {
$table_name = $row['name']; $row = array_values($row);
$table_name = $row[0];
//get the table data //get the table data
$sql = "select * from $table_name"; $sql = "select * from $table_name";