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
Post a Comment