Answer the question
In order to leave comments, you need to log in
Singleton - Why does php script slow down?
private function __construct(){
mysql_connect(self::Host,self::Root,self::Pass) or die (mysql_error());
mysql_select_db(self::DB) or die (mysql_error());
}
public static function getInstance (){
if (empty(self::$instance)){
self::$instance = new SQL();
}
return self::$instance;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question