There are far more elegant ways to do it.  But for such a small file, the
looping-through-and-writing-sql-inserts-one-at-a-time should work just fine.
As long as you don't have to do it more than once, and the file is so small,
that's what I'd do.  I've done it that way before.

An even uglier way: create a MS Word "mailmerge" document, the body of which
consists solely of your sql insert query (with the relevant values being
pulled from the Access file).

Then run the mailmerge.

Then copy-paste the resulting document into your MySql admin tool of choice.

Ugly, ugly, ugly.  But it works.  And, embarrassed as I am to admit it, I've
done it that way, too.  ;)

Joey
www.moderntales.com

----- Original Message ----- 
From: "Tim Thorburn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 19, 2004 10:24 PM
Subject: [PHP] connecting PHP to MS Access


> Hi,
>
> Ok, I know I've already spoken blasphemy ... but hear me out.  I have a
> client who wants to move her real estate site from a local ISP to a
> somewhat decent service.  Currently her site is all in Access/ASP - since
I
> know not of that world, I'm converting it to MySQL/PHP.  The person they
> had before I'm told either took the database file they're currently using
> from a friends job, or some manual somewhere, so its not setup as well as
> it could be, so I've re-created the tables in MySQL to function a little
> better.
>
> I've used most of the same names from the Access file, but a few things
> have had to be changed - its not a huge database, about 200 entries with
> about 40 rows each, but I'd rather not cut and paste all that in - I've
> tried exporting to CVS ... but its quite a jumbled mess, so the next best
> thing I thought would be to write a script to do the work for me.
>
> I'm guessing its just a matter of connecting to Access, and going query by
> query through its database, pulling the fields I want then inserting them
> into MySQL and looping through the process once again.
>
> Now, the question is - how to connect PHP to MS Access?  I've done some
> searching on Google - most pages say "wow, good luck with that" or
> something similar - any thoughts?  I'm sure someone has had to do this
> before - am I on the right track or should I be looking elsewhere?
>
> Thanks
> -Tim
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to