Fix more code quality issues

This commit is contained in:
Timothy Warren 2014-03-17 20:12:58 -04:00
parent b6192e6c0a
commit df5b4b9034
2 changed files with 2 additions and 6 deletions

View File

@ -113,7 +113,7 @@ class Firebird extends DB_PDO {
*/ */
public function query($sql) public function query($sql)
{ {
if (empty($sql)) throw new PDOException("Query method requires an sql query!"); if (empty($sql)) throw new PDOException("Query method requires an sql query!", 0, NULL);
$this->statement_link = (isset($this->trans)) $this->statement_link = (isset($this->trans))
? fbird_query($this->trans, $sql) ? fbird_query($this->trans, $sql)

View File

@ -144,7 +144,7 @@ class MySQL_Util extends DB_Util {
} }
// Get the list of tables // Get the list of tables
$tables = $this->driver_query("SHOW TABLES FROM `{$d}`"); $tables = $this->driver_query("SHOW TABLES FROM `{$d}`", TRUE);
foreach($tables as &$table) foreach($tables as &$table)
{ {
@ -183,8 +183,6 @@ class MySQL_Util extends DB_Util {
$res = $this->query($sql); $res = $this->query($sql);
$rows = $res->fetchAll(PDO::FETCH_ASSOC); $rows = $res->fetchAll(PDO::FETCH_ASSOC);
$res = NULL;
// Skip empty tables // Skip empty tables
if (count($rows) < 1) continue; if (count($rows) < 1) continue;
@ -211,8 +209,6 @@ class MySQL_Util extends DB_Util {
$insert_rows[] = $row_string; $insert_rows[] = $row_string;
} }
$obj_res = NULL;
$output_sql .= "\n\n".implode("\n", $insert_rows)."\n"; $output_sql .= "\n\n".implode("\n", $insert_rows)."\n";
} }