Please help me with importing database

Discussion in 'PHP' started by archc, Nov 4, 2012.

  1. #1
    Hi,

    I have one classified site running for sometime but the script doesn't work properly. I bought a new script and will be installing it now. My problem is, the already running classified site has lot of ads posted by many registered users and I want to import all the ads and users to new one. The already running site has many different fields (like current script asks for telephone no. but new one doesn't, current one asks for sub heading but new one doesn't... so many fields are different). Is there any way I could import all the ads and users to newly installed site?

    Unless I import the database, the registered users will not be able to login to newly installed script. I installed new script on local host, taken database backup of current database and imported but no ad shows in any category.

    Please help me out, I'm running out of time.

    Thanks in advance.

    Archc
     
    archc, Nov 4, 2012 IP
  2. freeadstime

    freeadstime Well-Known Member

    Messages:
    243
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    123
    #2
    It is not as simple as clicking on import DB from your phpmyadmin, since you have different fields. But, no one is stopping you from writing a simple php, mysql code. You just would get the fields you want then you will insert them into the new DB.
    The words you will come across to write this code probably are:
    SELEC * ...
    While...
    insert...
     
    freeadstime, Nov 4, 2012 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    Normaly these kind of scripts offer a upgrade method for older versions. But when the new version contains only (EXTRA) new fields and just use the old one, importing should not be a big problem. Maby you could install the old script on another server, upgrade that script (and ofcource database) and copy the changed database to the other new server you set up.
     
    EricBruggema, Nov 4, 2012 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    This is why people hire developers. I strongly suggest installing the two scripts locally (on one computer if you know how, on two if you don't), and trying to do whatever you're going to try there. (And being prepared to reinstall a few times.)

    Once you convince yourself that you can or can't do what's required, you'll know which way to go (do it yourself or hire someone), and you won't have messed up the original site.

    Or you could just hire someone to make the original script work properly.

    Whatever you do, DO NOT make any changes on the original site or in the original database. Once you destroy the original site, there's no way back. Do ALL your work on local installations using the original data. (Do an export of the database and import it to the local copy of the site.)
     
    Rukbat, Nov 5, 2012 IP