src/Helper/TableManipulation.php
public static function checkColumnExists($strTableName, $strColName, $blnAllowSystemCol = false)
    {
        self::checkTableExists($strTableName);
        self::checkColumnName($strColName, $blnAllowSystemCol);
        if (!self::getDB()->fieldExists($strColName, $strTableName, true)) {
            throw new \Exception(sprintf($GLOBALS['TL_LANG']['ERR']['columnDoesNotExist'], $strColName, $strTableName));
        }
    }
public static function checkColumnExists($strTableName, $strColName, $blnAllowSystemCol = false)
    {
        self::checkTableExists($strTableName);
        self::checkColumnName($strColName, $blnAllowSystemCol);
        if (!self::getDB()->fieldExists($strColName, $strTableName, true)) {
            throw new \Exception(sprintf($GLOBALS['TL_LANG']['ERR']['columnDoesNotExist'], $strColName, $strTableName));
        }
    }
Checks whether the given table exists.

@param string  $strTableName      The table name to check.

@param string  $strColName        The column name to check.

@param boolean $blnAllowSystemCol If this is set to true, no system column name checking will be applied.

@return void

@throws \Exception If an invalid table name has been passed or the table does not exist, the column name is
invalid or the column does not exist.

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)