Tag Archives: mysql

MySQL User Defined Function Example: Data Cleanup

(Updated June 9, 2016)

The Challenge

One of my current projects involves migrating a large amount of data away from an old custom Borland Paradox application into a new CiviCRM system. As with too many quickly-constructed apps, this old Paradox database wasn’t especially well designed and, among other the other challenges in salvaging the data, there were no restrictions on how dates could be entered. This means that, in multiple fields within each of the 20,000+ database records, I might see any of the following:

03-14-96
5/20/1975
10/02/83
09051975
07.19.1995
19830211121500

While CiviCRM does have a utility for importing data from CSV and other SQL tables, it was having quite a time with this collection and many of the dates were being mishandled. That’s if the records weren’t rejected entirely for other reasons. Data migration doesn’t often happen with just a few settings adjustments and a click of the Import button.

Continue reading

Coming in October – MySQL Explained (updated)

MysqlMy newest book, MySQL Explained, is due to be published this month! You can check out the LeanPub page to show your support and to sign up for notifications of when it’s published.  See the description of the book below.

UPDATE 10/24/2015 – MySQL Explained is now available in both EPUB and MOBI (Kindle) formats with the first chapter available for FREE from LeanPub.com and Amazon.com! Read more about this guide to the leading database for online applications and on the official page!

About the Book

MySQL Explained is a step-by-step tutorial for everyone who’s ready to learn about the database software most commonly used for storing information behind some of today’s most popular websites and online applications.

Written especially for people outside the I.T. world, MySQL Explained provides the background information you need to get familiar with database theory and the principles behind organizing data. This book starts from the ground up, helping the reader to understand the very definition of a database, the forms it can take and the different options for storing information. By the end of this book, you’ll understand the reasons for choosing MySQL, the options for installing it and the tools that it offers to store and safeguard your data.

If you are in any way involved in designing or managing a website or data solution of any kind, you owe it to yourself to understand the tools involved. Quality database management sytems are essential in today’s data-driven world and such essential tools should not be a mystery to those who depend on them. MySQL Explained can help you unravel the mystery and learn more about a technology that will be around for a long time to come.

MySQL Explained is published through OS Training which, in addition to publishing tutorials like this one, offers onsite and online training in web technologies including Joomla, Drupal and WordPress.