/** * Class constructor * * @param object &$driver_object * @return void */ public function __construct(&$driver_object) { parent::__construct($driver_object); // Required, due to mysql_data_seek() causing nightmares // with empty result sets $this->num_rows = mysql_num_rows($this->result_id); }
/** * Number of rows in the result set * * @return int */ public function num_rows() { // sqlsrv_num_rows() doesn't work with the FORWARD and DYNAMIC cursors (FALSE is the same as FORWARD) if (!in_array($this->scrollable, array(FALSE, SQLSRV_CURSOR_FORWARD, SQLSRV_CURSOR_DYNAMIC), TRUE)) { return parent::num_rows(); } return is_int($this->num_rows) ? $this->num_rows : ($this->num_rows = sqlsrv_num_rows($this->result_id)); }
/** * Class constructor * * @param object &$driver_object * @return void */ public function __construct(&$driver_object) { parent::__construct($driver_object); $this->stmt_id = $driver_object->stmt_id; $this->curs_id = $driver_object->curs_id; $this->limit_used = $driver_object->limit_used; $this->commit_mode =& $driver_object->commit_mode; $driver_object->stmt_id = FALSE; }