Working with your data safely.
WHERE IT HELPS
Writing queries Explaining what a query does Understanding an error Structuring a table
THE RULE THAT PREVENTS DISASTERS
Run the SELECT equivalent before any UPDATE or DELETE.
See exactly what would be affected before affecting it.
FOR WRITING QUERIES
Describe your tables and what you want.
"I have a table with these columns. I want [what]."
Test on a copy first.
FOR SERIALISED DATA
WordPress and many applications store serialised data.
A plain text replacement corrupts it.
Never run a generated find-and-replace against a WordPress database without using a tool that handles serialisation.
BEFORE ANY QUERY THAT CHANGES DATA
Back up the database. Not optional.
WHAT TO NEVER DO
Run a generated query on production as the first attempt Accept a query you do not understand Trust a row count it predicted
FOR ANYTHING UNCERTAIN
Open a ticket.