guide to make a trigger that inserts data from XML

Discussion in 'PHP' started by jhidalgo, Feb 7, 2011.

  1. #1
    Hello to everyone in this forum.
    I'm new in php but not programming, and I need some help.
    I explain what I'm trying to do.
    I have a client-server program developed in Delphi.
    Also I have a php shop with Mysql.
    I need to send data from MSSQL to MySQL.
    The idea is generate XML files loaded into the same machine where the MYSQL is, and then make a trigger to import with this data. But I don't have idea how to start, anybody can help, I want the strategy to build a solutions.

    It's possible?
    T'hank you.
     
    jhidalgo, Feb 7, 2011 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Why would you want to use MSSQL & MySQL both for one project? If its one time transition then fine, else it may not be as efficient.

    Anyways, I would advice to do export from MSSQL in csv format and then import the file directly into MySQL.
     
    mastermunj, Feb 7, 2011 IP
  3. jhidalgo

    jhidalgo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you mastermunj,

    Do you know how to do this process with a trigger or something else?
    I mean, It's not a problem to create a CSV, but the point is, how to import this automatically into MySQL...What's the way to do that?
    Thank you again mastermunj
     
    jhidalgo, Feb 7, 2011 IP
  4. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Write cron if you are on linux system. Or a schedular for windows.
    Periodically the file will be generated and kept at location X. The cron / schedular will run the files kept at location X and import it.
    Once imported, files will be moved to location Y or deleted.
     
    mastermunj, Feb 7, 2011 IP
  5. jhidalgo

    jhidalgo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks a lot, mastermunj.
    Is there a way to establish a permament way of communication between both systems? Like JDBC connection or something else?
    I want to say that it exists the way to establish a online communication using web services located on the MySql side?
     
    jhidalgo, Feb 8, 2011 IP