note 100998 deleted from function.mysql-connect by thiago

From: Date: Fri, 19 Nov 2010 12:07:41 +0000
Subject: note 100998 deleted from function.mysql-connect by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174183@lists.php.net to get a copy of this message
Note Submitter: ricardo dot miguel at cleverti dot pt ---- <?php public function mysqlConnect() //@ { /* This function connect auto to mysql. no need to call it because it's included in the other mysql functions below... call this only if you want to use a complete SET of mysql code...! Use with caution!! */ self::debugADD ( "Connecting to mysql..." ); $connection = mysql_connect ( $this->mysqlServerName , $this->mysqlServerUsername , $this->mysqlServerPassword ); if ( !$connection ) { die ( "MYSQL ERROR (Could not connect at: connectToMysql ... " ); return false; } self::debugADD ( "Connection established with success!" ); mysql_select_db ( $this->mysqlServerDataBase , $connection ); mysql_set_charset ( "utf8" , $connection ); self::debugADD ( "DataBase selected: $this->mysqlServerDataBase" ); return $connection; } ?>

« previous php.notes (#174183) next »