MySQL Tutorials
Editable Content Using MooTools 1.2, PHP, and MySQL
Everybody and their aerobics instructor wants to be able to edit their own website these days. And why wouldn't they? I mean, they have a $500 budget, no HTML/CSS experience, and extraordinary expectations. Enough ranting though. Having a website that allows for editable content blocks is the dream of many customers. I've taken a few hours to develop a system for in-page, editable content blocks.
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: