I want a list with columns that contains content. So i try that. I will check each field in my database do figure out which of them has no content.
$arrAllField is a list of available fields
$strTable is the table where im looking in
foreach ($arrAllField as $arrField)
{
$Result = $this->Database->prepare("SELECT * FROM ".$strTable." WHERE ".$arrField." <> '' AND ".$arrField." IS NOT NULL ")->execute();
while($Result->next())
{
$arrAllowedField[$arrField] = $arrField;
}
}
Oky but the problem is, i need to compare them, so that i only get back the columns where all rows contains content.
Maybe there is a better way to do that via SQL directly, like looking in the table and get only columns back where alle entries (rows) has content.
Best Regards
Peter