bux23 Posted May 3, 2015 Share Posted May 3, 2015 Hello, I am looking for a php script to import a .Sql file that is in a specific url (like: http://www.dropbox.com/s/xxxx/file.sql) to MySql DB. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/296039-mysql-import-sql-file-on-web-url-via-php/ Share on other sites More sharing options...
requinix Posted May 3, 2015 Share Posted May 3, 2015 Is this not something you can just do manually? Not many good reasons why you should be able to execute arbitrary SQL files on a regular basis. Fewer that require you to use PHP instead of, say, a cronjob. Quote Link to comment https://forums.phpfreaks.com/topic/296039-mysql-import-sql-file-on-web-url-via-php/#findComment-1510621 Share on other sites More sharing options...
bux23 Posted May 3, 2015 Author Share Posted May 3, 2015 I need my online server to update from a sql file I automatically export to my dropbox periodically with a cronjob. So i need a script on server side that imports that file, also with a cronjob. nyone can help me with the code? I have problems accessing the file from web url. Quote Link to comment https://forums.phpfreaks.com/topic/296039-mysql-import-sql-file-on-web-url-via-php/#findComment-1510631 Share on other sites More sharing options...
ginerjm Posted May 3, 2015 Share Posted May 3, 2015 Trying to understand your problem. You are looking for a php script that you can run to grab a .SQL file (a file containing some sql statements?) and then execute that sql code to update your db table(s). This sql file is created by some process outside your control I presume, otherwise why would you not just simply do the update instead of saving and retrieving this sql code from the .SQL file? Is that accurate? Quote Link to comment https://forums.phpfreaks.com/topic/296039-mysql-import-sql-file-on-web-url-via-php/#findComment-1510657 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.