Example #1
0
 /**
  * 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));
 }