PHP & mysqldump

Discussion in 'PHP' started by terryuk, Jun 1, 2007.

  1. #1
    I'm having troubles with a little something I'm trying to make. Right now I have;

    
    
    <?php
    
    $command="mysqldump --add-drop-table -uUSER --password=PASS DB TABLE";
    $test=system($command);
    
    ?>
    
    Code (markup):
    As i'm not putting the dump into a file, i'm getting abit confused. But i'd like to be able to restore that data using the variable test.

    Any suggestions? :eek::confused:

    Terry
     
    terryuk, Jun 1, 2007 IP
  2. amnezia

    amnezia Peon

    Messages:
    990
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    not quite sure what you're trying todo but if you want to dump the data into a file you would use the command

    "mysqldump --add-drop-table -uUSER --password=PASS DB TABLE > filename"
     
    amnezia, Jun 1, 2007 IP