Posted by peter on 02/25/07 17:15
> Actually, PHP4 does support the mysqli object, also.
>
> But in PHP5 your constructors are named __construct, not the class name.
> So you need to change the constructor name in your class, and call
>
> parent::construct(...)
Just a correction of Jerry's post. As of php 5 the __constructor method was
made available BUT the old constructor name is still useable.
The class you are actually using (mysqli) does in fact use a contructor
called mysqli as the following code snippet will demonstrate if you run it:-
<?php
function output_methods($obj)
{
$methods = get_class_methods($obj);
foreach ($methods as $method)
{
echo "function $method()\n";
}
}
output_methods("mysqli");
?>
[Back to original message]
|