note 95826 deleted from mysqli.errno by danbrown
| From: | danbrown@php.net | Date: | Sun, 24 Jan 2010 18:15:53 +0000 |
| Subject: | note 95826 deleted from mysqli.errno by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165254@lists.php.net to get a copy of this message | ||
Note Submitter: rash0 at hotmail dot com
Reason: bad code
----
Please note that, for an unknow reason to me, you can't write to this var if you create a class
that extends mysqli. Something like:
<?php
class dbase extends mysqli {
public function setErrno() {
$this->errno = 10;
}
}
$db = new dbase;
$db->setErrno();
echo $db->errno."\n";
exit();
?>
will return you the error:
Fatal error: dbase::setErrno(): Cannot write property in script.php on line 6.