• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

²h Create table and insert column via code


I would like to create a table and insert 2 columns in this :)
I have this code :
if($options->dark_taigachat_ban_group > 0){          
            // ban via secondary group
            /** @var XenForo_DataWriter_User */
            $userWriter = XenForo_DataWriter::create('XenForo_DataWriter_User');
            $secondaryGroups = explode(',', $userWriter->get('secondary_group_ids'));          
            if(!in_array($options->dark_taigachat_ban_group, $secondaryGroups)){
                $secondaryGroups[] = $options->dark_taigachat_ban_group;
So I want to create a table in the database with code and insert 2 colums in this, how can I do that ?