MysqliDb::tableExists PHP Method

tableExists() public method

Method to check if needed table is created
public tableExists ( array $tables ) : boolean
$tables array Table name or an Array of table names to check
return boolean True if table exists
    public function tableExists($tables)
    {
        $tables = !is_array($tables) ? array($tables) : $tables;
        $count = count($tables);
        if ($count == 0) {
            return false;
        }
        foreach ($tables as $i => $value) {
            $tables[$i] = self::$prefix . $value;
        }
        $this->where('table_schema', $this->db);
        $this->where('table_name', $tables, 'in');
        $this->get('information_schema.tables', $count);
        return $this->count == $count;
    }