Home > Backend Development > PHP Tutorial > 数据库 - php连接sql server使用sqlsrv_fetch_array无法查询超长数据

数据库 - php连接sql server使用sqlsrv_fetch_array无法查询超长数据

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:40:41
Original
1154 people have browsed it

服务器操作系统:Windows Server 2003
php版本5.3 vc6
数据库: sql server 2008

假设现在表A中有4个字段(id, name, content, flag),当content长度超长时,这条记录就查不出来了。php代码是这样写的

<code>$stmt = sqlsrv_query($sql);
$rs = array();
where($res = sqlsrv_fetch_array($stmt))
{
    $rs[] = $res;
}
</code>
Copy after login
Copy after login

返回的$rs是空的。

但是相同的代码在php 5.4 vc9上【本地开发环境,数据库连的服务器数据库】是可以查询的。所以是哪里的配置不对么?还是我写法不对?求教!

回复内容:

服务器操作系统:Windows Server 2003
php版本5.3 vc6
数据库: sql server 2008

假设现在表A中有4个字段(id, name, content, flag),当content长度超长时,这条记录就查不出来了。php代码是这样写的

<code>$stmt = sqlsrv_query($sql);
$rs = array();
where($res = sqlsrv_fetch_array($stmt))
{
    $rs[] = $res;
}
</code>
Copy after login
Copy after login

返回的$rs是空的。

但是相同的代码在php 5.4 vc9上【本地开发环境,数据库连的服务器数据库】是可以查询的。所以是哪里的配置不对么?还是我写法不对?求教!

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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template