Topic: Best Way to Add Fields to User Table in MySQL?
What would be the best way to add this data to the user table?
$schema = array(
'FIELDS' => array(
'continent' => array(
'datatype' => 'INT(2)',
'allow_null' => true
),
'x' => array(
'datatype' => 'INT(3)',
'allow_null' => true,
'default' => '0'
),
'y' => array(
'datatype' => 'INT(3)',
'allow_null' => true,
'default' => '0'
),
'alliance' => array(
'datatype' => 'VARCHAR(255)',
'allow_null' => true
),
'tournament_field' => array(
'datatype' => 'INT(2)',
'allow_null' => true
'default' => '0'
),
'game_status' => array(
'datatype' => 'INT(1)',
'allow_null' => true,
'default' => '0',
),
'castles' => array(
'datatype' => 'INT(3)',
'allow_null' => false,
'default' => '0'
)
)
);
$forum_db->add_field('users', $schema);
or some variation of it?