Skip to content

Instantly share code, notes, and snippets.

@vanilla-thunder
Created May 8, 2013 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanilla-thunder/5539483 to your computer and use it in GitHub Desktop.
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
$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