Browse Source

Change PHP-kohana over to PDO because of deprecation

Greg Hellings 10 years ago
parent
commit
3ac5e82a49
1 changed files with 10 additions and 15 deletions
  1. 10 15
      frameworks/PHP/php-kohana/application/config/database.php

+ 10 - 15
frameworks/PHP/php-kohana/application/config/database.php

@@ -4,22 +4,17 @@ return array
 (
     'default' => array
     (
-        'type'       => 'MySQL',
+        'type'       => 'PDO',
         'connection' => array(
-            /**
-             * The following options are available for MySQL:
-             *
-             * string   hostname     server hostname, or socket
-             * string   database     database name
-             * string   username     database username
-             * string   password     database password
-             * boolean  persistent   use persistent connections?
-             * array    variables    system variables as "key => value" pairs
-             *
-             * Ports and sockets may be appended to the hostname.
-             */
-            'hostname'   => 'localhost',
-            'database'   => 'hello_world',
+		/**
+		 * The following options are available for PDO:
+		 *
+		 * string   dsn         Data Source Name
+		 * string   username    database username
+		 * string   password    database password
+		 * boolean  persistent  use persistent connections?
+		 */
+	    'dsn'        => 'mysql:host=localhost;dbname=hello_world',
             'username'   => 'benchmarkdbuser',
             'password'   => 'benchmarkdbpass',
             'persistent' => FALSE,