Small PHP Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jackal
Forum Newbie
Posts: 10
Joined: Sat Apr 19, 2003 3:21 pm

Small PHP Question

Post by jackal »

We need a little help with code below, We are dumping mysql db with php file name june.sql.
Problem is the way we are doing it instead of new file everytime it appends the file. We need some coding before the dumping to either clean the file or remove where only the new dump shows up.
Hoping someone can help.

<?
//server part config
$server_dumppath="/home/user/public_html/db/"; //path to dump on server file (must be web acessable, 777 and protected with .htaccess)
$server_mysql_tablename="dbname"; //name of mysql db to dump
$server_mysql_username="dbusrname"; //mysql username
$server_mysql_password="pass"; //guess
//end config
exec("mysqldump -u ".$server_mysql_username." -p".$server_mysql_password." ".$server_mysql_tablename." > ".$server_dumppath."june.sql" );
?>
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I've moved this to PHP - Normal because it does not belong in the Advanced forum.

Please read:
Before Post Read: General Posting Guidelines

Mac
jackal
Forum Newbie
Posts: 10
Joined: Sat Apr 19, 2003 3:21 pm

Post by jackal »

Fixed
Post Reply