Exemplo n.º 1
0
 public function __construct(Database &$db, $result)
 {
     parent::__construct($db, $result);
     $this->_length = is_resource($this->_result) ? mysql_num_rows($this->_result) : 0;
     $this->resultOutput = self::RESULT_OBJECT;
 }
Exemplo n.º 2
0
 public function __construct(Database $db, $result)
 {
     parent::__construct($db, $result);
     if (!is_resource($this->_result)) {
         throw new DatabaseException("Not a valid MySQL Resource.");
     }
     $this->_length = (int) mysql_num_rows($this->_result);
     $this->resultOutput = self::RESULT_OBJECT;
 }