This is a classic problem but I was surprised to see that there’s not a great deal of info on the web on how to do a proper daily report – one that doesn’t have any gaps when data is missing. In this post I’ll guide you through building such a report using MySQL and PHP for presentation. Obviously, you will need to adapt the code for your needs, but the concepts should be valid for a wide range of similar needs.
I started to work on a pet project for tracking deleted/pending domains (myDomainTracker) and after starting development I was facing a big problem: How to do the data validation directly from MySQL ?
Many times I wanted to do data validation directly when inserting into a MySQL table and leave the source code of my application nice, clean and very readable, but support for that was only in Oracle and other SQL servers but not in MySQL.
Beginning with version 5 of MySQL the development team has added “triggering” to their SQL server engine, to meet the growing demand of users.