关于sqlsrv_fetch_array的回到求大神指点

WBOY
Release: 2016-06-13 12:54:08
Original
696 people have browsed it

关于sqlsrv_fetch_array的返回求大神指点
我是新手 最近做了个PHP+sqlserver的项目 一开始数据库装在本地 用的mssql_query没有问题 后来数据库不再装在本机 数据连接不到 所以改用了sqlsrv_query 但是又有新问题出现 在sqlsrv_fetch_array的时候 一旦数据库内有datatime型的 就无法返回 数据出错 那位指点下 百度了半天也没找到原因


------解决方案--------------------
对于这个 DateTime Object,可以使用 echo $row['datetime']->getTimestamp();或者 echo $row['datetime']->format('Y-m-d H:i:s');来显示。
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!