|
Posted by Jerry Stuckle on 02/25/07 20:11
peter wrote:
>> 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.
>
That's true if there is no __constructor method. However, from what I
understand, the old classname constructor is going away. If you're on
PHP5, you should be using the new way.
> 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");
> ?>
>
>
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|