From 45fdb318de9eee2bf1e6a226536020ab6360d41f Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 15 Jan 2007 21:54:27 +0000 Subject: [PATCH] fixed little bugs in firebird import driver --- lib/Doctrine/Import/Firebird.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/Import/Firebird.php b/lib/Doctrine/Import/Firebird.php index 12e43ae27..33266888c 100644 --- a/lib/Doctrine/Import/Firebird.php +++ b/lib/Doctrine/Import/Firebird.php @@ -53,7 +53,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import public function listTableFields($table) { $table = $this->conn->quote(strtoupper($table), 'text'); - $query = 'SELECT RDB\$FIELD_NAME FROM RDB$RELATION_FIELDS WHERE UPPER(RDB$RELATION_NAME) = ' . $table; + $query = 'SELECT RDB$FIELD_NAME FROM RDB$RELATION_FIELDS WHERE UPPER(RDB$RELATION_NAME) = ' . $table; return $this->conn->fetchColumn($query); } @@ -85,7 +85,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import { $query = 'SELECT DISTINCT RDB$VIEW_NAME FROM RDB$VIEW_RELATIONS'; $table = $this->conn->quote(strtoupper($table), 'text'); - $query .= 'WHERE UPPER(RDB\$RELATION_NAME) = ' . $table; + $query .= ' WHERE UPPER(RDB$RELATION_NAME) = ' . $table; return $this->conn->fetchColumn($query); } @@ -110,14 +110,11 @@ class Doctrine_Import_Firebird extends Doctrine_Import */ public function listTableTriggers($table = null) { - $query = 'SELECT RDB$TRIGGER_NAME - FROM RDB$TRIGGERS - WHERE RDB$SYSTEM_FLAG IS NULL - OR RDB$SYSTEM_FLAG = 0'; + $query = 'SELECT RDB$TRIGGER_NAME FROM RDB$TRIGGERS WHERE RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG = 0'; if ( ! is_null($table)) { $table = $this->conn->quote(strtoupper($table), 'text'); - $query .= 'WHERE UPPER(RDB$RELATION_NAME) = ' . $table; + $query .= ' WHERE UPPER(RDB$RELATION_NAME) = ' . $table; } return $this->conn->fetchColumn($query);