Category Archives: SQL Code

Edit MySQL database tables with PHP and AJAX

Every week I look at the PHP Classes newsletter to see if there are any cool new submissions. This one is perhaps the most exciting and promising that I've seen in a while!

Share

Easily create CSS tabs with PHP and AJAX

There are many different ways of simplifying an interface, and one of the best is by means of using tabs. I've written a couple of tutorials on making tabbed interfaces with CSS. However, it would be even easier to just have a class that generates the tabs automatically. Well, this class can be used to generate a tab based Web interface.

Share

A Powerful MySQL GUI Management Tool

I use MySQL on a daily basis, for all of my web applications. It's much faster to be able to interact with the databases and tables with a GUI tool rather that through the command line by using SQL statements. So obviously, I appreciate having a decent GUI.

Share

Automatic cPanel backup (domain & MySQL) with cron & PHP

OK, so I posed the question, and I found the answer. (Of course I had to find it myself, I just don't have people who regularly read my posts and do research for me!)

The situation is this: I use cPanel on my web hosting server. I use the cPanel backup tool to regularly backup my home directory (includes my web files, mail, etc), and my MySQL databases. I love the fact that you can use it to backup to a remote FTP server, and I do that on a fairly regular basis.

The major drawback is that you have to remember/schedule to perform this backup manually. This becomes especially difficult if you have multiple cPanel accounts. It would be amazing if you could just schedule the cPanel backup to run at regular intervals, perhaps with cron. Well, although there's no option for that in cPanel, the script below will allow you to do exactly that!

Share

Remove duplicate entries / rows a mySQL database table

This is an extremely quick and painless way to remove duplicate rows (tuples) from a MySQL database table. The best part of it is that it requires no programming or PHP coding whatsoever, it can all be done with three manual SQL queries! Note: this only works on MySQL 3.23 and above. But I have a hard time imagining anyone running an older version than that anyways!

Share