I am uploading accdb files in the database to import clients on my system, in a CRM that I used I could upload this file and automatically already displayed the columns to be able to be linking with CRM information. I was able to read the data from the file accdb by php and up, what I needed is to find the table that has inside that file and the names of the columns to be able to link with the necessary fields, currently if I know the name of the table I I can print the file data on the screen but if it is a user uploading the select would no longer work, and I can give a select in the name of the columns of the table?
$pdo = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=$db; Uid=; Pwd=;");
$sql = $pdo->prepare("select * from macica");
$sql->execute();
while ($linha = $sql->fetch(PDO::FETCH_ASSOC)) {
print_r($linha);
}
? >