ws DB config
[busui.git] / include / common-db.inc.php
blob:a/include/common-db.inc.php -> blob:b/include/common-db.inc.php
<?php <?php
if ($isDebugServer) $conn = pg_connect("dbname=transitdata user=postgres password=snmc"); if (php_uname('n') == "actbus-www") {
else $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata "); $conn = new PDO("pgsql:dbname=transitdata;user=transitdata;password=transitdata;host=bus-main.lambdacomplex.org");
if (php_uname('n') == "actbus-www") $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata host=db.actbus.dotcloud.com port=2242"); }
if (!$conn) { else if (isDebugServer()) {
echo "An error occured.\n"; $conn = new PDO("pgsql:dbname=transitdata;user=postgres;password=snmc;host=localhost");
exit; }
} else {
  $conn = new PDO("pgsql:dbname=transitdata;user=transitdata;password=transitdata;host=localhost");
function databaseError($errMsg) { }
die($errMsg); if (!$conn) {
} die("A database error occurred.\n");
  }
include('db/route-dao.inc.php'); if (isDebug()) {
include('db/trip-dao.inc.php'); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
include('db/stop-dao.inc.php'); }
?> function databaseError($errMsg)
  {
  die($errMsg);
  }
  include ('db/route-dao.inc.php');
  include ('db/trip-dao.inc.php');
  include ('db/stop-dao.inc.php');
  include ('db/servicealert-dao.inc.php');
  ?>