I’ve learned something new! I am synchronizing lots of data coming in XML containers into a MySQL database. Some child nodes of that XML miss identifiers which could be used to update the table and hence I was just truncating the table and re-inserting those values (many to many relation, no id). But since this is a live-used database this lead to the problem that stuff disappeared while using it.
SQL
Contao does not support prepared statements
Due to the naming of methods in Contao’s Database Layer one might get the impression that you might use prepared statements in Contao. Sadly that is not true. The goal of prepared statements is that the Database‘ query compiler does not need to run over and over again for the same query. Due to the method names „prepare“ and „execute“ I assumed (as a bug report shows, other people did as well) that Contao would offer prepared statements.
Continue Reading
MySQL Coalesce again
some time ago I wrote a small document about MySQL’s COALESCE usage. Today I was asked to help with such a construct for a similar usage-scenario. Here’s the result:
MySQL COALESCE Example & Why you should check the CLI in case of errors
Currently I’m working on some sort of shipping-system for a customer. It turned out that i was spending 3 days looking for a problem with my query while there was no problem. Well, apart from phpmyadmin 🙂 But, lemme tell you later about it.