I'm confronted to a strange issue here, I try to use an oracle stored procedure which works fine on sqldeveloper and java, but not on php.
I'm executing the query this way :
//$rqt_date = "SELECT DECODE( 1, NULL, 1, 33, '1', 44 ) as test FROM DUAL";
$rqt_date = "SELECT DATEPARAM('23/06/2016') as date_1900 FROM DUAL";
$parsed = ociparse($db_link, $rqt_date);
oci_execute($parsed,OCI_NO_AUTO_COMMIT);
while (($row = oci_fetch_array($parsed, OCI_BOTH)) != false)
{
print_r($row);
}
I test using the commented $rqt_date
(decode) : I get results
Array
(
[0] => 44
[TEST] => 44
)
But when I use DATEPARAM
I get 0 as values instead of 42542 (number of days since 1900) :
Array
(
[0] => 0
[DATE_1900] => 0
)
What I get in sqldeveloper:
I have no errors in the php logs.
The info about my server : PHP Version 5.3.8 System Windows NT BOWSER 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586