View Single Post
Old 09-17-2007, 06:39 PM   #15 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

If no arguments are passed to the constructor, an error will be raised because the arguments are not optional.

At the moment if you don't want to pass along any host/user/password you have to create an instance of the object like new database('', '', ''). If you want to be able to write new database() with no arguments then you need to change the function to:
public function __construct($host='', $user='', $pass='') {
Salathe is offline  
Reply With Quote