linuxÏÂPHPÁ¬½ÓAccessÎÊÌâ
<?
$myDB=odbc_connect("Dogs","","");
$query="select name,weight from dog_list";
$result=odbc_do($myDB,$query);
while(odbc_fetch_row($result)){
print odbc_result($result,"name");
print odbc_result($result,"weight");
}
?>
ºǫ́´í:
[Tue Nov 24 02:52:29 2009] [error] [client 192.168.41.30] PHP Warning: odbc_do() [ <a href='function.odbc-do'>function.odbc-do </a>]: SQL error: [unixODBC]Couldn't parse SQL\n, SQL state 08001 in SQLExecDirect in /var/www/html/b.php on line 4
[Tue Nov 24 02:52:29 2009] [error] [client 192.168.41.30] PHP Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in /var/www/html/b.php on line 5
[root@yjj logs]# cat /etc/odbc.ini
[Dogs]
Description = Microsoft Access Database of Dogs
Driver = MDBToolsODBC
Database = /home/DKRecord.mdb
Servername = localhost
UserName =
Password =
port = 5432
[root@yjj logs]# cat /etc/odbcinst.ini
[MDBToolsODBC]
Description = MDB Tools ODBC drivers
Driver = /usr/lib/libmdbodbc.so.0
Setup =
FileUsage  
Ïà¹ØÎÊ´ð£º
ÔÚ¹úÍâµÄ¿Õ¼ä£¬ÆäËüµÄphpÕ¾µã¶¼Õý³££¬¿ÉÖ»ÓÐ×î½ü½¨µÄÕâ¸öÕ¾µã£¬Ö»ÒªÒ»ä¯ÀÀphpÎļþ¾Í³öÏÖÏÂÔØÌáʾ£¬ÏÂÔØÏÂÀ´µÄÎļþ¶¼ÊÇ´øÓÐphpÔ´Â룬¸÷λ·¹ýµÄ£¬°ï°ïÎÒ£¬¿´¿´Ê²Ã´ÔÒò£¬ÏÈлÁË¡£
¿Õ¼ä²»Ö§³Ö¡£
»òÕßÄãµÄÕ˺ÅûÓп ......
ÎÒÓÃAccessÊý¾Ý¿â×öÁËÒ»¸öͼÊéÊý¾Ý¿â£¬ÀïÃæÓÐÒ»¸ö×Ö¶ÎÊÇISBN£¬¾ÍÊÇISBNºÅ£¬µ«ÊÇÖ»µÄÒ»×Ü·ÖͼÊéдµÄISBNºÅ£¬ÓеÄûд£¬Ð´µÄÄÇÒ»²¿·ÖÓеÄISBNÊÇÖظ´µÄ£¬ÄÜ·ñÓÃSQLÓïÑÔ°ÑÖظ´µÄ¹ýÂ˵ô£¬µ«Ã»Ð´ISBNºÅµÄͼÊé²»ÄܹýÂ˵ô£¬È ......
ÔÚMSSQLÖУ¬ÎÒÃÇ¿ÉÒÔÒ»´Î²éѯ¶à¸öÊý¾Ý±í²¢¼ÓÈëµ½Êý¾Ý¼¯ÖУ¬ÖмäÖ»ÐèÓ÷ֺŸô¿ª£®È磺
£¢select * from A;select * from B;select * from C£¢,Ìî³äÊý¾Ý¼¯ºóÔÚDSÖоÍÓÐÁËÈýÕÅ±í£®
µ«ÔÚÓÃͬÑùµÄÓï¾ä·ÃÎÊACCESSÊý¾ ......
<!--¹ºÂòÊýÁ¿-->
<div class='buyinfo'>
<table width='auto'>
<tr>
<td><span>¹ºÂòÊýÁ¿£º</sp ......
ÎÒÔÚmySqlÖÐÓÐÒ»×ֶοɴæhtml±êÇ©£¬±ÈÈç˵ÀïÃæÓÐa±êÇ©
µ«ÊÇÎÒÊäÈë²éѯÌõ¼þaµÄʱºò²¢²»Ïë²é³öÕâÌõ¼Ç¼£¬Ò²¾ÍÊÇ˵²éѯµÄʱºò²»¿¼ÂDZêÇ©,Ö»¿¼ÂÇÄÚÈÝ¡£
ÇëÎÊ´ó¼ÒÔõÑù½â¾ö£¿
¿ÉÒÔÔÙŪһ¸ö×Ö¶ÎÀ´±£´æ¹ýÂ˱êÇ©ºóµÄÄÚÈÝ¡£ ......