03.12.2019, 18:24
In table structure, you can alter the table and modify the column to add a default value (within web app). Or you can execute this query once:
It is advised to edit the CREATE TABLE too in case you need to import the table in the future:
What I also noticed is that you have columns WSlot0 to WSlot11. This is against 1NF (repeating groups). Create a separate table.
Another thing is this:
Instead of 5 columns that 4 of them are 0, have a single column name fighting_style and set a value between 0 and 4. You can easily find out which fighting style the player has.
pawn Code:
ALTER TABLE `ucty3` CHANGE `Armour` `Armour` float NOT NULL DEFAULT '0.0' AFTER `Skin`;
pawn Code:
`Armour` float NOT NULL DEFAULT '0.0',
Another thing is this:
pawn Code:
`Box` tinyint(1) NOT NULL,
`Kungfu` tinyint(1) NOT NULL,
`Kneehead` tinyint(1) NOT NULL,
`Grabkick` tinyint(1) NOT NULL,
`Elbow` tinyint(1) NOT NULL,

