How do I remotely updating my database?
Results 1 to 3 of 3

Thread: How do I remotely updating my database?

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Posts
    1

    How do I remotely updating my database?

    First, I need to provide clients with their inventory and order status. I plan on using PHP to pull the data from mySQL on a 3rd party web server and display it to the customer via their browser. That part is easy.
    Secondly, I want to periodically run a program at my company to get up to date inventory and order status information from my ERP system. That part is also easy.
    Third, I want my program that I am running at my company to then send this data to the PHP server in the first item above to update it's data. I have no clue how to do this!
    What technology or methods do I use to accomplish this? Does PHP provide a mechanism for this? What do I need to do in my program running on my company's side. Beholden and grateful to anyone who can point me in the right direction.

  2. #2
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    8,493
    That's a huge project for a small/one-man team. How I know this: www.ombe.com/ezlink

    The good news, perhaps: MySQL servers can be accessed remotely, so if you can write "a program at my company to get up to date inventory and order status information from my ERP system", you can, perhaps even during that process, hold open a handle to "the PHP server in the first item above", and write that data.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  3. #3
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    14,842
    Depending on the nature and amount of data, it might be sufficient to just have an API endpoint you can use to send input and update (and delete?) requests to, and then build a script on the "local" side to read your new data and call the API.

    Or you could simply(?) dump your data to a CSV file, then post that to an endpoint that will either read/process that file, or just do a load data infile MySQL command. Alternatively, you could SFTP that file to the server, and have a cron job watching for new files and which would then process the CSV file when found.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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