Permalink
Browse files

updated config and created db test

  • Loading branch information...
1 parent 6aabb27 commit 7dbc8b17577af4aa0300b5f988ca76c953bb694d @gibatronic gibatronic committed Apr 19, 2012
Showing with 19 additions and 22 deletions.
  1. +15 −22 php/config.php
  2. +4 −0 php/db-test.php
View
@@ -1,25 +1,18 @@
<?php
+define("HT", chr(9));
+define("LF", chr(10));
+define("CR", chr(13));
- define("HT", chr(9));
- define("LF", chr(10));
- define("CR", chr(13));
+define("IS_LOCAL", $_SERVER["HTTP_HOST"] == "local.agora.vc");
- define("IS_LOCAL", $_SERVER["HTTP_HOST"] == "local.agora.vc");
-
- if(IS_LOCAL) {
-
- define("DB_HOST", "localhost");
- define("DB_USER", "root");
- define("DB_PASS", "");
- define("DB_NAME", "db_agora");
-
- } else {
-
- define("DB_HOST", "");
- define("DB_USER", "");
- define("DB_PASS", "");
- define("DB_NAME", "");
-
- }
-
-?>
+if (IS_LOCAL) {
+ define("DB_HOST", "localhost");
+ define("DB_USER", "root");
+ define("DB_PASS", "");
+ define("DB_NAME", "db_agora");
+} else {
+ define("DB_HOST", "db.agora.vc");
+ define("DB_USER", "agora_dml");
+ define("DB_PASS", "1b6170977bf023b488");
+ define("DB_NAME", "db_agora");
+}
View
@@ -0,0 +1,4 @@
+<?php
+require("library.php");
+
+print_r(db("SELECT id FROM states"));

0 comments on commit 7dbc8b1

Please sign in to comment.