SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Need some mysql script help/advice....

    I do not have much sql experience and need some help in writing a script for a mysql DB.

    Compare 2 databases, then insert into the second one any records that are missing from the first. Here is the actual example:

    Main Database Name: MAIN_1
    Database to compare to and insert records into: VBSB_4

    The field to compare would be "username" on MAIN_1 and "name" on VBSB_4

    For any record missing on VBSB_4, insert the following record fields from MAIN_1 into VBSB_4:

    MAIN_1 Field...........VBSB_4 Field
    ```````````````````````````````````````````````````
    userid.................userid
    username............name
    email..................email
    password.............password_enc
    ............................num_ads (needs to be always 0)
    ...........................addressfield (needs to be null)
    ...........................registered (todays date in yyyyddmm format)

    I'd like to run this from my cron everynight to keep the 2 tables in sync...

    Thanks for anyones help!!
    Last edited by dmanrt; Mar 24, 2002 at 19:57.

  2. #2
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still have a need for this script, anyone??

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you willing to offer something in exchange for this? If yes, I will move this to the Trading Post for you

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


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
  •