Working with MySqldump to PHP. HOW?{SOLVED}

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
User avatar
khaki_monster
Forum Commoner
Posts: 73
Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:

Working with MySqldump to PHP. HOW?{SOLVED}

Post by khaki_monster »

hi! again!...

how do i invoke mysqldump with php script to make a backup, such as bellow sample code in some form of text file? i know how to work with mysqldump in a shell/"command" but i dont have any idea to work with php.

Code: Select all

-- 
-- Table structure for table `myTable`
-- 

CREATE TABLE `myTable` (
  `id` int(10) NOT NULL auto_increment,
  `message` text NOT NULL,
  `author` varchar(80) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `date` varchar(50) NOT NULL default '',
  `ip` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- 
-- Dumping data for table `myTable`
-- 

INSERT INTO `myTable` VALUES (1, 'this is a test', 'Victor', 'Your E-Mail', '12.07.05', '127.0.0.1');
hope to recieved a nice feedback's from you guyz :)

and tanx in advanced...

cheerz! :D
Last edited by khaki_monster on Sat Feb 25, 2006 2:42 pm, edited 2 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply