I use PDO prepared statements in a Web application I'm building. I have a timestamp column set to current_timestamp as default value.
Using a timestamp should normally assign the current timestamp when the column value is null, same as now() would do. But no matter what I try, I get a NULL value if I set the timestamp column to null and 0000-00-00 00:00:00 if I use now(). Using normal queries work perfectly fine.
I send my parameters as an associative array, then use a foreach with bindValue on the PDOStatement. It's always worked perfectly until this problem. I tried debugDumpParams, but it crashes pretty dramatically. It seems to be a known bug with 5.2.6 and Ubuntu hasn't updated the package yet. I'd rather avoid the trouble of bypassing aptitude and installing php from source since I'm not even sure if debugDumpParams would help...