Home > Backend Development > PHP Tutorial > 关于php访问access的迷惑,困扰了一天也没解决

关于php访问access的迷惑,困扰了一天也没解决

WBOY
Release: 2016-06-13 11:40:07
Original
939 people have browsed it

关于php访问access的困惑,困扰了一天也没解决

<br />$connstr="DRIVER=Microsoft Access Driver (*.mdb);DBQ=".realpath("D:/zhxlweb/web/www.test.com/zhxl.mdb") ; <br />    $connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC ); <br />	<br />	$sql = "select * from zhxl_article";<br />	<br />	$query = odbc_exec($connid,$sql);<br />	<br />	while($row=odbc_fetch_array($query)){<br />		print_r($row);<br />	}<br />
Copy after login


这样每次都可以把$row打印出来,我想返回结果只包含一个指定字段:
把 这句 $sql = "select * from zhxl_article"; 换成 $sql = "select article_title from zhxl_article";这样就什么也打印不出来,获取不到任何数据,我的字段都是正确的,只能返回(*),其余的都不行

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template