Predmet:Konekcija na mdb bazu
PreuzmiIzvorni kôd (PHP):<?php
$db = "./access.mdb" ; //????????????? MsAccess
$pass = "1234" ; //???????????
$conn = new COM("ADODB.Connection") ;
$sql = "DRIVER={Microsoft Access Driver (*.mdb)} ;
uid=admin ;
pwd=$pass ;" ;
$conn->open($sql);
$rs = $conn->execute("SELECT * FROM TableName");
while (!$rs->EOF) {
echo $rs->Fields['FieldID']->Value ;
echo $rs->Fields['FieldName']->Value ;
$rs->MoveNext() ;
}
$rs->Close() ;
$conn->Close() ;
?>
? ? ?
PreuzmiIzvorni kôd (PHP):<?php
$db = "./access.mdb" ; //????????????? MsAccess
$conn = new COM("ADODB.Connection") ;
$sql = "DRIVER={Microsoft Access Driver (*.mdb)} ;
$conn->open($sql);
$rs = $conn->execute("SELECT * FROM TableName");
while (!$rs->EOF) {
echo $rs->Fields['FieldID']->Value ;
echo $rs->Fields['FieldName']->Value ;
$rs->MoveNext() ;
}
$rs->Close() ;
$conn->Close() ;
?>
Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.
Ovaj post je ureden
1
puta. Posljednja izmjena 30.11.2010 20:26 od strane zxz.