NYCPHP Meetup

NYPHP.org

[nycphp-talk] Automating a manual process

David Mintz dmintz at davidmintz.org
Tue Oct 4 15:40:57 EDT 2005


On Tue, 4 Oct 2005, Aaron Fischer wrote:

> I have a manual process that I would like to make happen automatically
> (on a scheduled basis).
>
> The process:
> 1)  In MS Access on a local computer, run a query on a table, then
> export the query as a text file.
> 2)  From same local computer, append the text file data to a MySQL table
> on my web server.
>
> I would appreciate any tips or suggestions on how to make this happen.

I assume you mean export the data resulting from the query.

I haven't done much windows for a while and don't know the counterpart of
cron, but there must be one. But that's the last step.

You should be able to create an ODBC data source, then access it
programmatically -- e.g., with the PHP ODBC API
(http://us3.php.net/manual/en/ref.uodbc.php)

With your data in hand, it seems you can either

(1) connect to your hosts MySQL database directly across the network from
your machine and run the insert queries, or, if they don't let you do
that,

(2) do your own export-as-text (e.g., to tab-delimited), then upload it
via POST (cURL might be helpful) to another PHP script on your server that
accepts the upload and knows what to do with it -- break it back down and
run the queries with it. You will no doubt want to add user authentication
to the mix and possibly SSL.

There's probably a simpler/better solution about to be posted any second.
(-:


---
David Mintz
http://davidmintz.org/



More information about the talk mailing list