jeffrydell Posted May 20, 2008 Share Posted May 20, 2008 I collect data through my online application for multiple clients. Each client uses their data in one of several PC apps based off Excel, Access, or Filemaker Pro. I'm trying to figure out the most 'fool proof' way for the client to get their data from my db on to their local hard drive (specifically in their db). Up to now I've written a php script which, when given an identifying ID, will query my db and output client-specific info to an .xml file which can then be downloaded. My script then presents the user with a link to that .xml file for downloading. A friend of mine developed a VB script that opens the .xml file from the user's hard drive and maps all the .xml file data in to the appropriate tables & fields in the Access db. This works, but there's too much user interaction (too many opportunities for screw-ups / questions). So I'm looking for a 'better way'. Is it possible for that VB-based program to query my DB directly (with an identifier of some sort so they don't get EVERYBODY's data? OR is there a way to have that VB script start a php script and my script can STREAM the data to their hard drive? Any thoughts or suggestions on where I could learn about 'best practice' for moving data from MySQL to a local PC for use by another app would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
trq Posted May 21, 2008 Share Posted May 21, 2008 If your on a windows server you can quite easily create new access databases, populate that database with the information you wish from mysql then force a download of the access database file to the client. Is this an option? Quote Link to comment Share on other sites More sharing options...
jeffrydell Posted May 21, 2008 Author Share Posted May 21, 2008 Thorpe, Thanks for the idea. I'm on a windows server now ... not quite sure how to do those things ... BUT the website will be moving in the next year or so and probably end up on an Apache server for better functionality with all those wonderful .php apps (like Wordpress / Joomla / etc.). At that point I'd probably have to start over - not a good prospect. Other options? Quote Link to comment Share on other sites More sharing options...
redbrad0 Posted May 22, 2008 Share Posted May 22, 2008 Add a timestamp to each field in the mysql database that when a record changed/added, mysql will automatically update the timestamp. You can then write a easy PHP on the website that will loop thru all tables and pull any records that the timestamp is greater then the last timestamp you downloaded the files. You can then display this information in a XML file and have the VB Based application read the remote file from the website and process the data 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.