Force DROP TABLE in MySQL with foreign key constraint

When trying to update a local copy of one of my MySQL databases, I got the error
Cannot delete or update a parent row: a foreign key constraint fails
when issuing the command

As I immediately recreate the tables with the necessary foreign key constraints, I wanted to temporarily remove the constraints. After some Googl’ing, I learned that it is as simple as




PHP setlocale depends on underlying system (XAMPP on Windows)

I’m maintaining a few websites, so I have a local webserver running to do testing and debugging. Until recently, I was using IIS on my Windows laptop. However, I ditched IIS a while ago, replacing it with XAMPP. This is much closer to the environment that’s running the websites (e.g. I can use .htaccess directly, rather than converting it to a web.config file).

This all worked fine, except for setlocale in PHP. I wanted to use Dutch (Belgian), but I could not get
setlocale(LC_ALL, 'nl_BE');
to work on my local machine.

I searched the web, but did not find any useful information. So I looked at the PHP setlocale helpinfo again, and noticed the Tip in the NotesWindows users will find useful information about locale strings at Microsoft’s MSDN website.

After checking, it turned out that Microsoft decided to go for another “standard”, so ‘nl_BE’ was not recognized. To use Dutch on Windows, I needed
setlocale(LC_ALL, 'nld_nld');

Oh well…


Microsoft Word adding an extra space before colon

When looking at my blog analytics, I noticed an intriging thing: my most read post is a very old one, one I wrote more than 8 years ago. And yet, people seem to like to info that’s on there, as I regularly get comments and thank you’s from people that were close to insanity not understanding why sometimes Microsoft Word is automatically adding an extra space before a colon.

If you have been struggling with this as well, read my post of March 2008.