PHP_TRY_HARD Posted January 27, 2012 Share Posted January 27, 2012 I am fairly new to PHP and I want to get data off another database sitting on a different server. Is the best way to go about this Spit out a CSV every day (automated) Grab that CSV and insert it into the other database (automated) Is this the best way to sync the data? I want to use PHP and mySQL. Quote Link to comment Share on other sites More sharing options...
joel24 Posted January 27, 2012 Share Posted January 27, 2012 why would you do it every day? is the other db still live? what type of database is it? I'm sure you could connect to it via your PHP script and copy it that way. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 27, 2012 Share Posted January 27, 2012 You really should just use a database drive to talk to another database -- CSV is horrible. Quote Link to comment Share on other sites More sharing options...
PHP_TRY_HARD Posted January 29, 2012 Author Share Posted January 29, 2012 I am using an Apache server. I don't need to update every day, just whenever the database changes. The only thing I want is when I update the database I want it to be updated on all servers. Is it safe or even possible to access a database that isn't local host? Database Drive.... I will look into it. Is this something that should be loaded into my cpanel on an Apache server? Thank you all for your suggestions, I need some good advice before I get stuck into this project. Quote Link to comment Share on other sites More sharing options...
ignace Posted January 30, 2012 Share Posted January 30, 2012 The only thing I want is when I update the database I want it to be updated on all servers. See: Replication Quote Link to comment Share on other sites More sharing options...
PHP_TRY_HARD Posted January 30, 2012 Author Share Posted January 30, 2012 Thanks "Replication" is just what I needed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.