Re: [PHP] connecting PHP to MS Access
Export the data you are interested in as comma separated file. Then use the LOAD DATA INFILE - command in mysql, via the terminal or phpmyadmin. From the manual: 13.1.5 LOAD DATA INFILE Syntax LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LINES [STARTING BY ''] [TERMINATED BY '\n'] ] [IGNORE number LINES] [(col_name,...)] Read more here: http://www.mysql.com/doc/en/LOAD_DATA.html Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting PHP to MS Access
On Mon, 2004-01-19 at 22:24, Tim Thorburn wrote: 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? You can use MyODBC available at the MySQL site -- BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC GnuPG: http://gnupg.org http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting PHP to MS Access
Actually I found an even better program on mysql.com called MyDbConverter - converted the Access database into MySQL in a whole wopping second - now just needs a little cleanup and I can put it into the new table I've already created. Thanks for all the help -Tim At 09:34 AM 1/20/2004, Brian V Bonini wrote: On Mon, 2004-01-19 at 22:24, Tim Thorburn wrote: 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? You can use MyODBC available at the MySQL site -- BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC GnuPG: http://gnupg.org http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC Linux Registered User #339825 at http://counter.li.org -- 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
[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
Re: [PHP] connecting PHP to MS Access
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
Re: [PHP] connecting PHP to MS Access
Hi, Tuesday, January 20, 2004, 1:24:46 PM, you wrote: TT Hi, TT Ok, I know I've already spoken blasphemy ... but hear me out. I have a TT client who wants to move her real estate site from a local ISP to a TT somewhat decent service. Currently her site is all in Access/ASP - since I TT know not of that world, I'm converting it to MySQL/PHP. The person they TT had before I'm told either took the database file they're currently using TT from a friends job, or some manual somewhere, so its not setup as well as TT it could be, so I've re-created the tables in MySQL to function a little TT better. TT I've used most of the same names from the Access file, but a few things TT have had to be changed - its not a huge database, about 200 entries with TT about 40 rows each, but I'd rather not cut and paste all that in - I've TT tried exporting to CVS ... but its quite a jumbled mess, so the next best TT thing I thought would be to write a script to do the work for me. TT I'm guessing its just a matter of connecting to Access, and going query by TT query through its database, pulling the fields I want then inserting them TT into MySQL and looping through the process once again. TT Now, the question is - how to connect PHP to MS Access? I've done some TT searching on Google - most pages say wow, good luck with that or TT something similar - any thoughts? I'm sure someone has had to do this TT before - am I on the right track or should I be looking elsewhere? TT Thanks TT -Tim Probably the simplest way is to install the mysql odbc driver in windows then just export from access, it should create the table automatically and you might just have to cleanup the types afterwards. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php