Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不同的结果-SQL Server和PHP(PEAR DB)_Php_Sql_Sql Server_Pear - Fatal编程技术网

不同的结果-SQL Server和PHP(PEAR DB)

不同的结果-SQL Server和PHP(PEAR DB),php,sql,sql-server,pear,Php,Sql,Sql Server,Pear,我尝试使用php pear db运行一个查询,但没有返回任何值。但是,当我使用SQL Server运行时,我会得到数据 在PHP中,我已经设置了: “设置ANSI_为空”和“设置ANSI_警告为空” 查询: 选择A.nome,count(sa.id_sala)作为指示,cast(平均值(合并(sa.dt_final,sa.dt_ping_internauta)>sa.dt_inicio_atendicato),然后datediff(分钟,合并(sa.dt_inicio,sa.dt_inicio)

我尝试使用php pear db运行一个查询,但没有返回任何值。但是,当我使用SQL Server运行时,我会得到数据

在PHP中,我已经设置了:

“设置ANSI_为空”和“设置ANSI_警告为空”

查询:

选择A.nome,count(sa.id_sala)作为指示,cast(平均值(合并(sa.dt_final,sa.dt_ping_internauta)>sa.dt_inicio_atendicato),然后datediff(分钟,合并(sa.dt_inicio,sa.dt_inicio),合并(sa.dt_finalandicato,coale)(sa.dt_final,sa.dt_ping_internauta)作为货币)其他0结束[media em minutos]从sala SA加入atendente A on(A.id_atendente=SA.fk_id_atendente),其中SA.interno=0,并在'2012-01-01'和'2012-12-31'之间合并(SA.dt_inicio_Atendento,SA.dt_inicio),SA.fk_id_empresa=1组,按A.nome顺序2描述

已解决

解决方案:

“SQL Server中使用的安全日期时间字符串格式是

YYYYMMDD HH:MM:SS或YYYY-MM-DDTHH:MM:SS。“

已解决

解决方案:

“SQL Server中使用的安全日期时间字符串格式是

YYYYMMDD HH:MM:SS或YYYY-MM-DDTHH:MM:SS。“


请添加您的解决方案作为答案。