Forráskód Böngészése

defined a seperate connection for mongo and MySql

Michael Francis 14 éve
szülő
commit
29b78de553
1 módosított fájl, 14 hozzáadás és 12 törlés
  1. 14 12
      config/bootstrap/connections.php

+ 14 - 12
config/bootstrap/connections.php

@@ -37,10 +37,22 @@
  */
 use lithium\data\Connections;
 
+/**
+ * Uncomment this configuration to use MySQL as your default database.
+ */
+Connections::add('default', array(
+ 	'type' => 'database',
+ 	'adapter' => 'MySql',
+ 	'host' => '127.0.0.1',
+ 	'login' => 'otakuhub',
+ 	'password' => 'otakuhub',
+ 	'database' => 'otakuhub'
+ ));
+
 /**
  * Uncomment this configuration to use MongoDB as your default database.
  */
- Connections::add('default', array(
+ Connections::add('mongo', array(
  	'type' => 'MongoDb',
  	'host' => 'localhost',
  	'database' => 'otakuhub',
@@ -57,16 +69,6 @@ use lithium\data\Connections;
 // 	'database' => 'my_app'
 // ));
 
-/**
- * Uncomment this configuration to use MySQL as your default database.
- */
-// Connections::add('default', array(
-// 	'type' => 'database',
-// 	'adapter' => 'MySql',
-// 	'host' => 'localhost',
-// 	'login' => 'root',
-// 	'password' => '',
-// 	'database' => 'my_app'
-// ));
+
 
 ?>