rscott7706 Posted November 16, 2007 Share Posted November 16, 2007 I have searched extensively for any existing post along these line and cannot find any that address my need. I have a non-profit group that wants to upload water quality testing stats on a nightly basis to the web server database. Currently, the info is sampled by sensors in a pond, then transmitted to their local server (probably Windows type). They then want the info converted to MySql, then automatically get transported in the the web server database on a nightly basis. Now, all the up font stuff is no problem, but I have not gotten in to CRON jobs yet, and wonder if a php routine can be built that would upload the MySql table automatically every night. I have seen them for just the opposite (downloading table info), but not uploading. Can anyone help with direction on this? Would it be a fairly simple php routine? Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted November 17, 2007 Author Share Posted November 17, 2007 Just want to bump this in case someone may help. Thanks. Quote Link to comment Share on other sites More sharing options...
Foser Posted November 17, 2007 Share Posted November 17, 2007 If you tell us more about the web server, and then I could maybe tell you ways to catch it with php then put into mysql queries. Quote Link to comment Share on other sites More sharing options...
axiom82 Posted November 17, 2007 Share Posted November 17, 2007 How are you reading the data? Loop through the data array, do your php calculations if necessary, and execute consecutive MySQL INSERT statements to add the current data elements into a MySQL table. Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted November 17, 2007 Author Share Posted November 17, 2007 To Foser, "If you tell us more about the web server, and then I could maybe tell you ways to catch it with php then put into mysql queries." Here you go, SERVER INFORMATION: operating system FreeBSD 4.11-STABLE mysql version mysql Ver 12.22 Distrib 4.0.27 perl version perl, v5.8.3 php version PHP 4.4.1 ================================ To axiom82: I apologize, but don't understand your suggestion. In my feeble mind, it would be better to upload the entire file (they are fairly small, 400k now). Am I misunderstanding your suggestion? I would think the cleanest, most simple way would be: 1. through my own work, I would assure there is a MySql file sitting on their internal server ready to go each night 2. We would have a PHP routine (again on their server) that fires and uploads the MySql file to the Web server at a certain time in the early morning hours (2 or 3 am). Am I looking at this wrong? 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.