Last active
December 17, 2015 02:58
-
-
Save vanilla-thunder/5539449 to your computer and use it in GitHub Desktop.
[OXID eShop] check if a table column exists, e.g. for module activatin / deactivation events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$oDb = oxDb::getDb(); | |
$oRs = $oDb->metaColumnNames("tablename"); | |
// check for lower case and upper case column name | |
if (!array_key_exists("columnname", $oRs) && !array_key_exists("COLUMNNAME", $oRs)) { | |
{ | |
// column does not exists | |
// do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment