Forum Moderators: coopster

Message Too Old, No Replies

PHP and ACCESS?!?!?!?

         

havoc

4:13 am on Jun 10, 2003 (gmt 0)

10+ Year Member



A friend of mine wants me to do up a PHP front end to his Access DB. I've looked around on google. Got a few pointers off here.

Do anyone have anymore tut's / sites / tips you could give me to help me out. I have done moderate work with mysql. But i heard access is a far bit different to access and change with php

thanks

Birdman

4:33 am on Jun 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Migrating from MS Access to MySql
how big an effort is it?
[webmasterworld.com]

From Access to MySql
any directions available?
[webmasterworld.com]

It should be fairly simple..good luck!

havoc

6:26 am on Jun 10, 2003 (gmt 0)

10+ Year Member



it needs to remain a ACCESS DB tho :(
Because the admin use access for some stupid reason

waldemar

9:03 am on Jun 10, 2003 (gmt 0)

10+ Year Member



I'm not sure if it can be done in php.
But I recently developed a web-frontend (apache) for an access-mdb-backend (windows nt) using the *DBI module* in Perl which is actually rather simple. Just google for "perl, dbi, access, dsn"; that should get you going.

pb_michael

6:39 pm on Jun 10, 2003 (gmt 0)



You should be able to connect to Access using the odbc_*() functions in PHP. These functions are fairly anologous to their mysql_*() counterparts, but they're not as robust (took me some trial and error to figure them out).

Michael

mavherick

7:06 pm on Jun 10, 2003 (gmt 0)

10+ Year Member



Besides using the odbc functions [ca2.php.net], you'll have to set up a datasource on your machine.

Simply go to Administrative Tools, then in Data Source. You'll want to set it up on the System tab for it to work properly (If I remember correctly).

mavherick

havoc

6:00 am on Jun 12, 2003 (gmt 0)

10+ Year Member



Thanks for your info

How close is SQL to Mysql? I couldnt find too much about it on google. they said they might put it on sql now instead of access

beckyh

9:20 pm on Jun 13, 2003 (gmt 0)

10+ Year Member



Why would they want to use MS SQL when they can have MySQL for free? I've used both and as far as how they work, they're very similar. Especially if you're already switching from an MS Access db. You should just go ahead and start out with MySQL to save hassle.

From what I know the major differences between MS SQL and MySQL are that MySQL doesn't have triggers, stored procedures, and views. But you don't really need them if you're going to use php and know SQL. You can just store your SQL statements in a php function.

My advice, use MySQL from the beginning. And don't forget about PHPMyAdmin, that'll be a big help.

BH

Storyteller

9:54 pm on Jun 14, 2003 (gmt 0)

10+ Year Member



havoc, MS Access has a nice built-in help with all its SQL stuff explained. SQL syntax differences from MySQL can be significant. Use ODBC functions in PHP to connect to the Access DB.

You may also want to use MySQL as the only DB and make Access work with it through MySQL ODBC drivers. In this case be sure to have primary key and timestamp columns in every table or Access won't update records.

rweston002

3:24 pm on Jun 16, 2003 (gmt 0)

jatar_k

3:26 pm on Jun 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld rweston002

Fischerlaender

4:31 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Why would they want to use MS SQL when they can have MySQL for free?

MS SQL Server is a real RDBMS, while MySQL is still on its way to become one.

MySQL lacks several features:
- triggers
- stored procedures
- views
- subselects
- foreign keys
- full outer joins
- constraints

It's like comparing a small pick-up to a heavy truck. This also means noone would use the truck, if the pick-up is sufficient.

I do a lot of work with MySQL and I'm really a fan of it; I also have done several web projects with MS Access and MS SQL Server. One of the Access projects was switched to MS SQL Server, which was very easy. It would have been much more work to transfer the project to MySQL.

My advice for you is simple: Use the DB that best suits your needs.
If ODBC is a possible way for you to go, stay with Access and use the PHP ODBC functions.
If the ODBC solution isn't stable enough, tell them to migrate to MySQL (or PostgreSQL, if the before mentioned lacking features are a problem) and the directly access MySQL.

joshuadh

5:38 am on Jun 18, 2003 (gmt 0)

10+ Year Member



MS. Access has high portability. You can move the db with just bring one file.

Entering database with a lots of data for the first time is easier using MS. Access, because it can be done locally, and then upload it to webserver, compared with MySQL where we have to click screen-by-screen accross the Internet.

Lots of my client data are based on Microsoft (like Excel, Access), but the low-cost solutions for Web-based application are "mySQL".

The big problem is: migrating the Microsoft things to mySQL based db smoothly... any idea, please raise.

josh