Created
May 8, 2013 09:57
-
-
Save vanilla-thunder/5539483 to your computer and use it in GitHub Desktop.
[OXID eShop] check if a table exists or not, e.g. for module activation / 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(); | |
$sCheck = "SHOW TABLES LIKE 'tablename'"; | |
// returns string if table found or false if not found | |
if (!$oDb->getOne($sCheck)) | |
{ | |
// table does not exists | |
// do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment