public static function delete($tableName, $whereClause)
    {
        if ($tableName === '') {
            throw new \InvalidArgumentException('The table name must not be empty.', 1331315508);
        }

        self::enableQueryLogging();
        $dbResult = self::getDatabaseConnection()->exec_DELETEquery(
            $tableName,
            $whereClause
        );
        if (!$dbResult) {
            throw new \Tx_Phpunit_Exception_Database(1334439746);
        }

        return self::getDatabaseConnection()->sql_affected_rows();
    }