Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2010
    Thanked 0 Times in 0 Posts

    i want to transefer one server table to another server same name table

    hi i want to transefer one server table to another server same name table

    i have Cost_Main table in the server1

    i want to transfer Cost_Main of server1 to Cost_Main to localhost

    hear i have query

    mysql_connect("server1", "Admin", "123456") or die(mysql_error());
    mysql_select_db("firefox") or die(mysql_error());

    $sqlstr="SELECT * INTO
    FROM Cost_Main As Cost_Main_11 ";


    this not working

    plz give me sample query.......................

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,738 Times in 4,700 Posts
    Well, for starters, don't use PHP to do this.

    Use a database administration tool of some kind. Where you will get both help and more meaningful error message than your PHP code (especially the code you show) will give you.

    Anyway, the usual way to do this is via mysqldump (a utility program that is part of all MySQL distributions). And most (all?) DB admin tools will have a way to invoke the dump. You then transfer the dump file to your other server and load the table data from the dump file.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


    Posting Permissions

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