Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.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
ORA-01843不是使用OCI8 php的有效月份_Php_Oracle_Oci8_To Date - Fatal编程技术网

ORA-01843不是使用OCI8 php的有效月份

ORA-01843不是使用OCI8 php的有效月份,php,oracle,oci8,to-date,Php,Oracle,Oci8,To Date,我用PHP安装了一个oci8模块,当在查询中使用到日期转换时,我得到一个错误。当我在我的sql开发人员中使用完全相同的查询时,它工作得很好 php: 错误: 我使用了另一个不同的to_date格式的查询,这个查询用于to_dateto_charto_datep_kuu,‘mm’、‘MONTH’、‘MONTH’; 所以我不知道发生了什么。使用日期'01.01.2014','DD.MM.YYYY'代替文字常量。和谷歌NLS_日期_格式参数请。格式掩码是正确的。我可以在actual_completio

我用PHP安装了一个oci8模块,当在查询中使用到日期转换时,我得到一个错误。当我在我的sql开发人员中使用完全相同的查询时,它工作得很好

php:

错误:

我使用了另一个不同的to_date格式的查询,这个查询用于to_dateto_charto_datep_kuu,‘mm’、‘MONTH’、‘MONTH’;
所以我不知道发生了什么。

使用日期'01.01.2014','DD.MM.YYYY'代替文字常量。和谷歌NLS_日期_格式参数请。格式掩码是正确的。我可以在actual_completion列中看到该值,例如“20.08.2013 22:13:56”,当我在sqlplus或sql developer中执行它时,它工作得很好。好了,现在知道了。我以前不理解你的评论。现在开始工作了,谢谢!正确查询:从tellitud_eic中选择countdistinct mp_eic kogus,asp,其中“E63001”、“E90000”和wo_发布的工时表中的工作类型不为空,并且截止日期实际完成日期“dd.mm.yyyyy hh24:mi:ss”<截止日期“2014年1月1日”、“dd.mm.yyyyy hh24:mi:ss”由asp分组
include("db_connection.php");


$query = "select count(distinct mp_eic) kogus, asp
from tellitud_eic
where work_type in ('E63001','E90000')
and wo_issued_meter is not null
and to_date(actual_completion, 'dd.mm.yyyy hh24:mi:ss') < '01.01.2014'
group by asp";


$parseQuery = oci_parse($connection, $query);

$result = oci_execute($parseQuery);

$sqlResultJson = array();


while ($row = oci_fetch_array($parseQuery, OCI_ASSOC+OCI_RETURN_NULLS)) {
    array_push($sqlResultJson, $row);
}

$json = json_encode($sqlResultJson);

echo $json;
Warning:  oci_execute(): ORA-01843: not a valid month in <b>C:\Apache24\htdocs\queries\query_2013_installation_by_asp.php on line 15
Warning:  oci_fetch_array(): ORA-24374: define not done before fetch or execute and fetch in <b>C:\Apache24\htdocs\queries\query_2013_installation_by_asp.phpon line 
[]