I have been tackling this issue for full two days now, I think I have realised what the problem is, but have no idea how to actually fix it.
There is a SQL table with the following column:
`Opened` TIMESTAMP NULL DEFAULT NULL COMMENT ''
I need to query this table and see:
WHERE Opened IS NULL
I'm running PHP 5.6 with PDO and MariaDB as the database. The Actual query is a bit more complex, but works just fine when run directly to the database. When run with PDO + PHP, a problem with the 'IS NULL' statement is encountered. PDO returns a row with a "timestamp" as though it was 'NULL'.
This lead me to believe something was going wrong with the character "translation" (and I read somewhere that it could be a issue) and I tried changing the collation characters and it did not help. I Then checked the database log directly for the executed queries and the statement was indeed translated correctly. So the problem lies somewhere in the returning translation... I can only guess at this point.
Would appreciate any help on the issue, thanks!