ok i have this variable set to true and i do not understand why it is not working
PHP Code:
$grabfields= $DB_site->query("SHOW FIELDS FROM " . TABLE_PREFIX . "journal_settings");
while($field= $DB_site->fetch_array($grabfields))
{
if($field['Field'] == "version")
{
$versionexists= true;
}
else
{
$versionexists= false;
}
}
$DB_site->free_result($field);
if($versionexists)
{
echo "VERSION EXISTS!";
$checkversion= $DB_site->query_first("SELECT version FROM " . TABLE_PREFIX . "journal_settings LIMIT 1");
$prevversion= $checkversion['version'];
echo $prevversion;
}
else
{
echo "NO VERSION DETECTED!";
$upgrade= true;
$prevversion= "1.0.1";
}
it seems to keep thinking $versionexists is false even though it is true. also the field "version" does exist in the table.