Yazan: dp | 27 January 2011 | No Comments
Categories: Computers, Software
Image via Wikipedia Sometimes, I have a need to SELECT data from a table, LEFT JOINed with another table (because the data in the second table is optional), but then INNER JOINed with a third table. Unfortunately, the resulting query runs (essentially) as two INNER JOINs, removing data that I want. That’s where nested joins [...]
Yazan: dp | 06 May 2010 | No Comments
Categories: Servers
Yesterday, I managed to delete the primary database that we use at work. I won’t go in to how this happened, other than to say: Fuck you MySQL Workbench. I was trying to get a map of the table relations within the database. Needless to say, it didn’t work. After the immediate pants-wiping, I restored [...]
Yazan: dp | 26 January 2010 | 4 Comments
Categories: Servers
I admit, I borrowed this from How to fix strange characters in MySQL database – Vinh Pham. But I also added a few more that were missing; update <table> set <field> = replace(<field>, ‘’’, ‘\”); update <table> set <field> = replace(<field>, ‘…’, ‘…’); update <table> set <field> = replace(<field>, ‘–’, ‘-’); update <table> set <field> [...]