コード例 #1
0
ファイル: func.php プロジェクト: huasanyelao/baixing-camp
 public static function closeConnection()
 {
     if (isset(self::$connection)) {
         mysql_close(self::$connection) or die(mysql_error());
     }
     self::$connection = null;
 }
コード例 #2
0
ファイル: Kijiji.php プロジェクト: QiTai/MiniChaoge
 public static function getConnection()
 {
     if (self::$connection == null) {
         self::$connection = mysql_connect("localhost", "root", "") or die(mysql_error());
         mysql_select_db("chaoge") or die(mysql_error());
         mysql_query("set names utf8") or die(mysql_error());
     }
     return self::$connection;
 }
コード例 #3
0
ファイル: Kijiji.php プロジェクト: huasanyelao/baixing-camp
 public static function getConnection()
 {
     if (self::$connection == null) {
         self::$connection = mysql_connect('localhost', 'root', 'pisces228') or die(mysql_error());
         mysql_select_db('chaoge') or die(mysql_error());
         mysql_query('set names utf8') or die(mysql_error());
     }
     return self::$connection;
 }