note 108007 deleted from mysqli-result.num-rows by peehaa

From: Date: Wed, 24 Jul 2013 19:50:16 +0000
Subject: note 108007 deleted from mysqli-result.num-rows by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-195759@lists.php.net to get a copy of this message
Note Submitter: jonteh at zaphotel dot net ---- <?php class mysqlisimple extends mysqli { public function __construct($hostname, $username, $password, $database) { $this->connection = @parent::__construct($hostname, $username, $password, $database); if($this->connection->connect_error) { die($this->connection->connect_error); } } public function DBResult($query) { $this->PrepareQuery = $query; if ($this->Result = $this->query($this->PrepareQuery)) { while ($this->row = $this->Result->fetch_row()) { $this->output = $this->row[0]; } } return $this->output; } } ?> This is a simple class to extend MySQLi and includes a function to fetch a single result. Was just playing, thought it may help some.

« previous php.notes (#195759) next »