global $DB_CONNECTION;
$DB_CONNECTION = false;
+
+global $db_url, $db_type;
+error_log("in include for database, $db_type, $db_name");
+
+
// i need to figure out how i do data encapsulation here. We'll support mysql and sqlite3 off the bat if we can - sqlite3 comes first tho
function gwvp_dbCreateMysqlStructure()
{
function gwvp_isDBSetup()
{
// for sqlite, we just check if the db exists, for everyone else, we check for a conneciton and go yay or nay
- global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_url;
-
+ global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name;
+
+ // oh this isnt working. poo.
+ error_log("checking for $db_name, $db_type");
+
if($db_type == "sqlite") {
- if(file_exists($db_url)) return true;
+ if(file_exists($db_name)) {
+ return true;
+ }
else return false;
}
global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $DB_CONNECTION;
// first check if $DB_CONNECTION IS live
+ error_log("in connection $db_type, $db_name");
+
if($DB_CONNECTION != false) return $DB_CONNECTION;
if($db_type == "sqlite") {