MySQL Tutorials
MooTools Star Ratings with MooStarRating
I've said it over and over but I'll say it again: JavaScript's main role in web applications is to enhance otherwise boring, static functionality provided by the browser. One perfect example of this is the Javascript/AJAX-powered star rating systems that have become popular over the...
MySQL date_add
Here's a quick MySQL tip I wanted to throw your way. I created an event system a while back and one of the requirements of the system was to show events that happened yesterday forward, meaning events older than 2 days were to be hidden.
Create Custom Element Property Getters and Setters with MooTools
One of the goals of the MooTools projects is to create very flexible methods by which developers may modify or extend the behavior of given classes. One example of that flexibility is the ability to customize the Element class' get and set methods for specified...
Create a Basic Web Service Using PHP, MySQL, XML, and JSON
Web services are taking over the world. I credit Twitter's epic rise to the availability of a simple but rich API. Why not use the same model for your own sites? Here's how to create a basic web service that provides an XML...
Backup Your Database into an XML File Using PHP
Backing up data is extremely important. Most of the time the database is the most important piece of the puzzle. Imagine losing all of the data in your database -- it would be tragic. Here's a PHP snippet that outputs your database as...
Animated AJAX Record Deletion Using MooTools
I'm a huge fan of WordPress' method of individual article deletion. You click the delete link, the menu item animates red, and the item disappears. Here's how to achieve that functionality with MooTools JavaScript. The PHP - Content & Header The following snippet goes at the...
Breaking & Fixing Dates from MySQL to PHP
The way that databases store "date" field data is: The way that us humans read dates (at least in the U.S.) is: I write a lot of administrative panel modules that either display dates or, better yet, allow customers to their own dates for articles, events, etc.
Using MooTools 1.2 For Drag, Drop, Sort, Save
This post has been updated: Using jQuery or MooTools For Drag, Drop, Sort, Save. The code on this page is no longer best practice. The following is a repost of an article that ran on Script & Style a few months ago.... My...
Format Date Fields Using MySQL DATE_FORMAT()
I use MySQL DATE and DATETIME fields almost as much as VARCHAR fields. I use them mostly to track record creation, record updates, and record expiration dates. The default date format in MYSQL is: When I pull this information into the page, I want to...
Backup Your MySQL Database Using PHP
One of the most important tasks any developer needs to do often is back up their MySQL database. In many cases, the database is what drives most of the site. While most web hosts do a daily backup of a customer's database, relying on...