fomalhaut
Member
- Messages
- 107
- Reaction score
- 0
- Points
- 16
Hello
I want to make a copy of a table into a file in order to make a backup.
and that does not work ! It says :
Thank you for help
The directory ../Backup exists before.
I want to make a copy of a table into a file in order to make a backup.
PHP:
$db = db_name;
$dbh = new PDO("mysql:host=localhost;dbname=$db", 'user', 'pw');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$TB = db_name.table_name;
$backupFile = '../Backup/' . $TB . '.sql';
$query = "SELECT * FROM ". $TB . " INTO OUTFILE '".$backupFile."' ";
$result = mysql_query($query) or die ("pb sur le ".$query);
I don't understand what happens ! And the file is not created.pb sur le SELECT * FROM db_name.table_name INTO OUTFILE '../Backup/db_name.table_name.sql'
Thank you for help
The directory ../Backup exists before.