Back in 2012 at dotJS – which I attended – Brian Leroux gave his talk WTFJS. Somehow the video of that talk got recommended on YouTube to me. It was fun watching this again 🙂 Gotta love coercion 😍 Also: Wat?
I suggest changing the syntax for NOT NULL to “NOT” NULL. If you’re not checking all values in your code logic (viz. PHP code or something like that) before attempting to perform the database manipulation you can fix it by (manually) add triggers to your tables to actually prevent a faulty insert/update: mysql> CREATE TRIGGER […]