The confusion about PHP accessing access has plagued the day without solving
$sql = "SELECT * from Zhxl_article";
$query = Odbc_exec ($connid, $sql);
while ($row =odbc_fetch_array ($query)) {
Print_r ($row);
}
So every time you can print out the $row, I want to return the result contains only one specified field:
This sentence $sql = "SELECT * from Zhxl_article"; Replace with $sql = "Select Article_title from Zhxl_article", so that nothing can be printed, get no data, my fields are correct, can only return (*), the rest is not
Share to:
------Solution--------------------
Post the Print_r ($row); The results
------Solution--------------------
Odbc_errormsg ();
Look at what the error message
------Solution--------------------
Open source stuff is best matched with open source stuff. This is a deep-seated problem.
------Solution--------------------
Recommended use of the ADODB class
------Solution--------------------
Create COM components that can be accessed using ASP
------Solution--------------------
Select Article_title from Zhxl_article
If you are sure that there is no problem with the field name and table name, try the alias:
Select A.article_title from Zhxl_article a