Skip to the content...

Welcome to the David Walsh Blog. I'm a MooTools, Dojo, jQuery, CSS, and PHP Web Developer located in Madison, Wisconsin, United States. Please contact me if I can make your experience on my website better.

MySQL Tutorials

Adding Days To Dates In MySQL

One of my customers recently asked me to increment the date field on an event in their database by 14 days because their upcoming event got delayed. I knew the SQL statement would be simple and after doing some quick research, I found the magical SQL:

MySQL’s REPLACE() Is PHP’s STR_REPLACE()

The PHP function that I use the most could be str_replace(). If you aren't familiar with the function, here's what it does:

Return Random Records in MySQL

The ability to return random records from a MySQL table is invaluable. Returning random records is helpful when:

PHP / MySQL Database Optimization Function

After frequent record deletion from your MySQL database tables, your tables can acquire overhead. Overhead is empty space left inside the database table due to the deletions. A great way to speed up your MySQL database, not to mention keep it compact, is to use a simple PHP function to optimize your database tables:

« Newer posts