You are here: Re: Extending the mysqli class « PHP Programming Language « IT news, forums, messages
Re: Extending the mysqli class

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");
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация