mysql - Connecting php to mdb or sql on Mac locally -


i'm running local apache server on mac, , want connect local database (have same db both .sql , .mdb). php

$dbname = "\db\dbname.mdb"; $db = new pdo("odbc:driver={microsoft access driver (*.mdb)}; dbq=$dbname; uid=; pwd=;"); 

i have web stuff in local server , databases in db folder. if or explain how can done locally sql.

thanks!

working access database php can challenging @ best of times. on os x (or linux) more tenuous (in opinion) if 1 tries use middleware unixodbc , mdb tools.

if .sql file indeed mysql (as suggested 1 of question tags) you'll save fair bit of aggravation using local install of mysql server (instead of access .mdb) database storage.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -