コード例 #1
0
 /**
  * Overwritten Fetch a result row as an associative array
  *
  * @access	public
  * @return array
  */
 function loadAssoc($translate = true, $language = null)
 {
     if (!$translate) {
         return parent::loadResult();
     }
     $result = null;
     $result = $this->_loadObject($translate, $language);
     $pfunc = $this->_profile();
     if ($result != null) {
         $fields = get_object_vars($result);
         $pfunc = $this->_profile($pfunc);
         return $fields;
     }
     return $result;
 }
コード例 #2
0
 /**
  * Overwritten method to loads the first field of the first row returned by the query.
  *
  * @return The value returned in the query or null if the query failed.
  */
 public function loadResult($translate = true, $language = null)
 {
     if ($this->skipjf) {
         return parent::loadResult();
     }
     $this->translate = $translate;
     if (!$translate) {
         $this->skipSetRefTables = true;
         $result = parent::loadResult();
         $this->skipSetRefTables = false;
         return $result;
     }
     $result = null;
     $ret = null;
     $result = $this->_loadObject($translate, $language);
     $pfunc = $this->profile();
     if ($result != null) {
         $fields = get_object_vars($result);
         $field = each($fields);
         $ret = $field[1];
     }
     $pfunc = $this->profile($pfunc);
     return $ret;
 }