Horde_Db::FETCH_BOTH => MYSQL_BOTH);
$this->_fetchMode = $map[$fetchmode];
}
+
+ /**
+ * Returns the number of columns in the result set
+ *
+ * @return integer Number of columns.
+ */
+ public function columnCount()
+ {
+ if (is_null($this->_result)) {
+ $this->rewind();
+ }
+ return mysql_num_fields($this->_result);
+ }
}
Horde_Db::FETCH_BOTH => MYSQL_BOTH);
$this->_fetchMode = $map[$fetchmode];
}
+
+ /**
+ * Returns the number of columns in the result set
+ *
+ * @return integer Number of columns.
+ */
+ public function columnCount()
+ {
+ if (is_null($this->_result)) {
+ $this->rewind();
+ }
+ return $this->_result->field_count;
+ }
}