comphist / cora

A web-based, token-level annotation tool for non-standard language data
http://www.linguistics.rub.de/comphist/resources/cora/
MIT License
10 stars 6 forks source link

Malformed SQL queries throwing errors in strict mode #73

Closed mbollmann closed 7 years ago

mbollmann commented 8 years ago

Originally reported by: Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann)


Some SQL queries working with AUTO_INCREMENT columns insert NULL into these columns to generate a value automatically. This is documented behavior.

However, it seems that they actually try to insert the string "NULL", which was overlooked so far because it still works fine (though emitting warnings) when MySQL's strict mode is off. With strict mode enabled, these queries throw an error.

The code should be updated to use either the value "null" or a value of zero.


mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Issue #80 was marked as a duplicate of this issue.

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Use PDO::PARAM_NULL where appropriate (fix #70)