Zero value being stored as null

I have insert & update queries for a bunch of yes/no select fields with standard values 1 for yes and 0 for no.

Yes is correctly storing the value as 1 but when I select No the 0 is not stored, instead the entry defaults to null.

I do have default(null) set up in the queries because the user must have the option to leave the select field blank, i.e the options are…

<option></option>
<option value="1">Yes</option>
<option value="0">No</option>

The data type in the database is TINYINT.

Does anyone know why the 1 is being stored but the 0 is not?

Thanks

Community Page
Last updated: