Explore these results from Bing
- Viewed 127k times15edited Apr 7, 2020 at 16:12
If you are just getting started with a new project then I would suggest that you use PDO instead of the old odbc_exec() approach. Here is a simple example:
<?php$bits = 8 * PHP_INT_SIZE;echo "(Info: This script is running as $bits-bit.)\r\n\r\n";$connStr ='odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};' .'Dbq=C:\\Users\\Gord\\Desktop\\foo.accdb;';$dbh = new PDO($connStr);$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);$sql ="SELECT AgentName FROM Agents " ."WHERE ID < ? AND AgentName <> ?";Content Under CC-BY-SA license Using an Access Database with PHP — SitePoint
Explore further
How to connect PHP with Microsoft Access database
- People also ask
PHP MySQL Connect to database - W3Schools
How to connect to MS Access. PHP and ODBC.
Working with Microsoft Access Database using PHP PDO
Connecting to an Access Database using PHP - UWA …
WEBFeb 18, 2016 · That’s when a colleague of mine, Joanna Sirkoska landed upon ADOdb which allowed us to use PHP to connect to an Access Database. In this post, I’ll briefly go through how you can connect to …
Open Microsoft Access Database in PHP with PDO
WEBJan 21, 2019 · Open Microsoft Access Database in PHP with PDO. We'll teach you how to turn a database into a DSN and establish a connection with PHP using PDO.
PHP and Database Access | php[architect]
PHP: odbc_connect - Manual
Connecting to a Database - Modern PHP Tutorial
- Some results have been removed