I've recently done a new server install, and it seems on the old one I had
sql_mode='' in my
my.cnf file. I've removed that now, so I have the default
STRICT_TRANS_TABLES and the other default options.
Sadly though, that STT declaration is breaking my php PDO code where I explicity force type on my booleans, and send
false through to the database.
I guess before these were being silently converted to
Are these my only options:
change my PHP variables ($isArchived etc) from the semantic niceness of
sql_mode = ''
Or am I missing something? My columns are defined as tinyint(1) - that used to be the best we could do with MySQL, and I don't THINK there's a boolean type, even now. What's the best practice? Thank you!
I realise now it's just
false it fails on. It happily converts
1, but for some reason sees
'' and balks. Could this be a problem in my PHP code rather than MySQL...