PHP DB Access Update

 

- Info:

- This tutorial shows how to use PHP to UPDATE Access DB.

 

- Example:

- Create PHP Console Application Write.php.

 

Write.php

<?php

#CONNECT TO DB.

$db = 'D:\Temp\PHP\guestbook.mdb';

$conn = new COM('ADODB.Connection');

$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");

#EXECUTE STATEMENT.

$sql = "UPDATE people SET AGE=90 WHERE NAME='John'";

$rs = $conn->Execute($sql);

?>