Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Extending the mysqli class
Re: Extending the mysqli class
Overriding the constructor is quite common. But you need to ensure you
also call the parent class constructor.
As to seeing the code - it's like anything else in PHP. If it's a PHP
file, you can see the code. If, like with mysqli, it's a compiled
extension, you need to look at the source code for the extension.
If you want some error checking when you open the connection, see if the
connection is open after calling the mysqli constructor (see if
mysqli_connect_error() is non-zero).
You don't need an external function - you just need to check for errors.
And if you don't want to keep checking the responses, check you
Remove the "x" from my email address
JDS Computer Training Corp.