jeeva Posted February 10, 2007 Share Posted February 10, 2007 hi frnds, I want build a application by using php and Ms Access. Still i haven't used Ms Access.Is there any major diffrence between mysql and Ms Access to be used with php? Quote Link to comment Share on other sites More sharing options...
artacus Posted February 10, 2007 Share Posted February 10, 2007 If you've never used access before, then why bother? There's a huge difference in speed and scalability. Quote Link to comment Share on other sites More sharing options...
trq Posted February 10, 2007 Share Posted February 10, 2007 Is there any major difference between mysql and Ms Access to be used with php? Not really, but it depends what you mean. You use the odbc] interface to connect to access. It has much of the same functionality as the mysql* interfaces. Access's sql is a little different in places as well but this has nothing really to do with php. Quote Link to comment Share on other sites More sharing options...
fred12ned Posted February 10, 2007 Share Posted February 10, 2007 mysql <?php $con = mysql_connect("server","username","password"); mysql_select_db("database"); mysql_query("SELECT * FROM items"); ?> ms access(only on MS Windows server does not mater) <?php $con = new COM("ADODB.Connection"); // MS Access 2003 or before $db = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./db.mdb").";"; // MS Access 2007 //$db = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=". realpath("./db.accdb").";"; $db_conn->open($db); $rS = $db_conn->execute("SELECT * FROM items"); $f1 = $rS->Fields(1); $f2 = $rS->Fields(2); $f3 = $rS->Fields(3); $f4 = $rS->Fields(4); $f5 = $rS->Fields(5); $f6 = $rS->Fields(6); ?> 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.