On 4/10/07, mandark <[EMAIL PROTECTED]> wrote:

> I just want to know how to connect MS Access sa
> php.

Heres a sample code
(from http://www.actionscript.org/forums/showthread.php3?s=&threadid=21969
)

<?php
$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".
realpath("./Northwind.mdb").";";
$db_conn->open($connstr);
$rS = $db_conn->execute("SELECT * FROM Employees");
$f1 =  $rS->Fields(0);
$f2 =  $rS->Fields(1);
while (!$rS->EOF)
{
   print $f1->value." ".$f2->value."<br />\n";
   $rS->MoveNext();
}
$rS->Close();
$db_conn->Close();
?>

the code above uses the ms ado com object, which will run only on ms
windows platforms.


May I suggest using MySql so that you can run your program on multiple
platforms (linux, unix, etc..)



weeeeeh... good scrumble with the codes.. what about the queries(add,
delete, update, etc.)?
is there a manual for this(for a noob)?
--
ArchAngel
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph

Reply via email to