$conn = gwvp_ConnectDB();
- $sql = "select * from config where config_name='$confname'";
+ $sql = "select config_value from config where config_name='$confname'";
$res = $conn->query($sql);
$return = null;
foreach($res as $val) {
- $return = $val;
+ $return = $val["config_value"];
}
+ return $return;
}
function gwvp_eraseConfigVal($confname)
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, $repo_base, $data_directory, $db_type, $db_url;
+ global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_url;
if($db_type == "sqlite") {
if(file_exists($db_url)) return true;
function gwvp_ConnectDB()
{
- global $WEB_ROOT_FS, $BASE_URL, $repo_base, $data_directory, $db_type, $db_name, $DB_CONNECTION;
+ global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $DB_CONNECTION;
// first check if $DB_CONNECTION IS live
if($DB_CONNECTION != false) return $DB_CONNECTION;