Example #1
0
 protected static function &createConn()
 {
     $config = Config::Connection();
     $conn = ADONewConnection($config['driver']);
     if (!$conn->Connect($config['host'], $config['username'], $config['password'], $config['database'])) {
         die("<p>Tidak bisa melakukan koneksi dengan databas {$config['database']} </p>");
     }
     $conn->SetFetchMode(ADODB_FETCH_ASSOC);
     $conn->debug = $config['debug'];
     return $conn;
 }