Explorar el Código

[ZF-5970]Optimize Zend_Db_Table::find();

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15658 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp hace 16 años
padre
commit
04ae26e6b4
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      library/Zend/Db/Table/Abstract.php

+ 2 - 2
library/Zend/Db/Table/Abstract.php

@@ -77,7 +77,7 @@ abstract class Zend_Db_Table_Abstract
 
     const SELECT_WITH_FROM_PART    = true;
     const SELECT_WITHOUT_FROM_PART = false;
-    
+
     /**
      * Default Zend_Db_Adapter_Abstract object.
      *
@@ -1167,11 +1167,11 @@ abstract class Zend_Db_Table_Abstract
         $whereClause = null;
         if (count($whereList)) {
             $whereOrTerms = array();
+            $tableName = $this->_db->quoteTableAs($this->_name, null, true);
             foreach ($whereList as $keyValueSets) {
                 $whereAndTerms = array();
                 foreach ($keyValueSets as $keyPosition => $keyValue) {
                     $type = $this->_metadata[$keyNames[$keyPosition]]['DATA_TYPE'];
-                    $tableName = $this->_db->quoteTableAs($this->_name, null, true);
                     $columnName = $this->_db->quoteIdentifier($keyNames[$keyPosition], true);
                     $whereAndTerms[] = $this->_db->quoteInto(
                         $tableName . '.' . $columnName . ' = ?',