SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Mysql Dump Php

  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2004
    Location
    Boston
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql Dump Php

    Hello,

    Is there a PHP command to dump a MYSQL DB into the queries that populate it? I am trying to combine two tables in my DB and I dont want to have to manually if it can be avoided. I have seen this type of function before I'm just not sure how to do it.

    Thanks.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Probably be better in the MySQL forum but depending on your MySQL Version, you might be able to do it in a nested sub-query.

    (or just wait for someone to come along who knows.....!)

    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Addict lmasi02's Avatar
    Join Date
    Aug 2004
    Location
    Zambia
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use system() function. This work well on linux coz u can execute mysql from any direcorate. Do a search on system() function
    Power of Knowledge

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I am fairly certain system() calling mysqldump is the only way to do ti through PHP. Well, other then using PHP's native mysql functions to mimic a dump but that's hardly worth the effort.

  5. #5
    SitePoint Evangelist
    Join Date
    Apr 2004
    Location
    Boston
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help I will study up on system(). I actually found a freeware script that does the table setup but I need the data out of the table as well. I have seen it done before where I enter a table name and the query history of the table returns. It is very helpful for backups and modifying table data.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •