Skip to content

MySQL INSERT inserting BIT to 1 instead of 0

I have the following query which should insert a 0 but instead inserts 1. It is executed with prepared statements in PHP: All inserts are performed fine, except a 1 is inserted in column6 instead of a 0. Column 6 has the datatype BIT. The query works fine, however, when executing directly in the phpmyadmin &#…

SQL restart number sequence each year

I’m Working to create a simple repair log serial number. I would like to create a unique code for each repair but I don’t want the numbers continuing on forever, I would like to use Zone(department), …