ctf_marker icon indicating copy to clipboard operation
ctf_marker copied to clipboard

Adding a team fails due to lack of SCORE and PENALTY

Open kernel-sanders opened this issue 8 years ago • 2 comments

https://github.com/rgajendran/ctf_marker/blob/5135484c7a8e912249ecea7d1350cfabe5df3dd0/admin.php#L132

https://github.com/rgajendran/ctf_marker/blob/5135484c7a8e912249ecea7d1350cfabe5df3dd0/admin.php#L920-L926

Field 'SCORE' doesn't have a default value

Perhaps not every single field in all tables should be NOT NULL?

kernel-sanders avatar Aug 22 '17 18:08 kernel-sanders

Are you using phpMyAdmin? If the field is either int or double. phpMyAdmin automatically marks its as 0 if the value is NULL. If you are using different database then you need to set the value for score and penalty as "0".

rgajendran avatar Aug 22 '17 19:08 rgajendran

The 'Add Team' page was failing for me with no useful output, so I took the SQL statement from admin.php and ran it manually in phpMyAdmin which returned the error

Field 'SCORE' doesn't have a default value

Token generation is also non-function probably due to the same NOT NULL errors.

kernel-sanders avatar Aug 22 '17 19:08 kernel-sanders