Another simple backup script. This script builds on the rsync file backup to allow daily, monthly, and yearly incremental MySQL database backups. The backup will […]
Continue readingTag: MySQL
Finding Duplicate Rows in SQL
I used this to solve a problem today. // Finding duplicates in a table SELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING […]
Continue readingHow to Repair a MySQL Database
If a server is shutdown unexpectedly (power outage or hardware failure), one or more MySQL tables can be locked open and may need to be […]
Continue readingFunction to Create an Array from Database Results in PHP
This simple function will create an array out of the multi-dimensional rows returned from a database query. function mysql_fetch_array_r($result,$result_type=MYSQL_NUM) { $arr = array(); for($i=0;$i<@mysql_num_rows($result);$i++) { […]
Continue reading