This little scripts create's a backup of your database and website files at once and puts them on a folder on your webhosting.
PLAIN TEXT
PHP:
function backupDB($dbhost,$dbuser,$dbpass,$dbname, $sitename){
global $savepath , $date ;
$date = date("dmY");
if (!file_exists("$savepath/$date")) {
mkdir("$savepath/$date", 0777);
}
$filename = "$savepath/$date/SQL$sitename-$date.sql";
passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname>$filename");
}
PLAIN TEXT
PHP:
function backupWWW($wwwdirectory,$wwwname){
global $savepath , $date ;
if (!file_exists("$savepath/$date")) {
mkdir("$savepath/$date", 0777);
}
$filename = "$savepath/$date/WWW$wwwname.tar.gz";
$zipline = [...]
For people like me comming from a Microsoft world(MS SQL/Access) these tools are great. I only used phpmyadmin before but it needed something to quicky join tables and alter data in the grid.
After some investigation i found 2 decent free tools:
webyog
MySQL GUI Tools
In this guide i'm going to give a detailed explanation on how u can get the domain name out of a referer URL wich is stored in mysql. The whole process will be executed on the MySQL server.
What i actually want to achieve is a MySQL function that returls me 'google' when my referer URL [...]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||