Cruisecar Posted October 10, 2006 Share Posted October 10, 2006 I have a huge MySQL Database, with many tables, and data within. Currently I backup the Database by running a dump from phpMyAdmin. I need to know the php code needed to do so automaticly (I will program it so it does so every 12 hours). I've made my own script that can backup individual tables, but need a way of backing up the whole database in one go.I cannot use any of the methods mentioned on this site [url=http://www.php-mysql-tutorial.com/perform-mysql-backup-php.php]http://www.php-mysql-tutorial.com/perform-mysql-backup-php.php[/url], due to security features on my host.Any help would be appreciated,Thankyou. Quote Link to comment https://forums.phpfreaks.com/topic/23581-database-backup/ Share on other sites More sharing options...
Daniel0 Posted October 10, 2006 Share Posted October 10, 2006 If you can do one table, then just do this: [code]$query = mysql_query("SHOW TABLES FROM db_name_here");while($table = mysql_fetch_row($query)){ $table = $table[0]; // do your stuff here}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23581-database-backup/#findComment-107060 Share on other sites More sharing options...
Cruisecar Posted October 10, 2006 Author Share Posted October 10, 2006 You are a genious! That is exactly what is was looking for. Thankyou. Quote Link to comment https://forums.phpfreaks.com/topic/23581-database-backup/#findComment-107079 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.