Using PHP's ODBC functions to interface with MS Access : odbc_connect « MySQL Database « PHP






Using PHP's ODBC functions to interface with MS Access

 
<?
$connect = odbc_connect("ContactDB","","") or die("Couldn't connect to datasource.");
$query = "SELECT First_Name, Last_Name, Cell_Phone, Email FROM Contacts";

$result = odbc_prepare($connect,$query);

odbc_execute($result);
odbc_result_all($result,"border=1");
odbc_free_result($result);

odbc_close($connect);
?>
  
  








Related examples in the same category

1.odbc_connect(): establish a connection.