Doporučuji:
Galerie fotek
Notebooky
Webdesign Praha
www.eprdel.cz
www.root.cz
Lumimont
A
apt-get install unixodbc
apt-get install unixodbc-bin
apt-get install libmdbodbc
apt-get install libmdbtools
apt-get install mdbtools
[ODBC]
Trace=yes
Tracefile=/tmp/trc.log
[LOIR]
Description = MicrosoftAccessDatabaseofLOIR
Driver = MDBToolsODBC
Database = /var/www/storage.mdb
Server = localhost
Username = ""
Password = ""
[MDBToolsODBC]
Description = MDBToolsODBCdrivers
Driver = /usr/lib/libmdbodbc.so.0
UsageCount = 1
FileUsage = 1
<?php
$conn=odbc_connect('LOIR','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT CITY_NAME, CITY_ZIPCODE FROM CITIES";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>CITY_NAME</th>";
echo "<th>CITY_ZIPCODE</th></tr>";
while (odbc_fetch_row($rs))
{
$compname=odbc_result($rs,"CITY_NAME");
$conname=odbc_result($rs,"CITY_ZIPCODE");
echo "<tr><td>$compname</td>";
echo "<td>$conname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>