Oracle 11g and scheduler , can not recive any data

Hello,

Last two days i’m fighting with running scheduler with our oracle db , and i’m out of ideas what can be wrong.

Query that connector is running , and db response :

oracle.php server side code

[code]<?php
require(dirname(FILE).“/codebase/connector/scheduler_connector.php”);
require(dirname(FILE).“/codebase/connector/db_oracle.php”);

$res = oci_connect(‘', '*****’, ‘localhost/apex’);
//print(var_dump($res));
$scheduler =new SchedulerConnector($res,‘Oracle’);//initializes schedulerConnector
$scheduler->enable_log(“./log2.txt”,true);
$scheduler->render_sql(“select ID,PIN,WEJSCIE,WYJSCIE from ZKA_CZAS_PRACY where WEJSCIE<WYJSCIE”,‘ID’,“WEJSCIE,WYJSCIE,PIN”);

?>
[/code]
and client side …

[code]<!doctype html>

Loading data from a database html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }
 
 
[/code]

log file :

[code]SELECT ID,PIN,WEJSCIE,WYJSCIE FROM ZKA_CZAS_PRACY WHERE ( WEJSCIE<WYJSCIE) AND WEJSCIE < ‘2014-07-01’ AND WYJSCIE > ‘2014-06-01’

Done in 0.017712831497192s
[/code]

php log is empty - no errors
firefox console only one warning

Error: http://192.168.0.205/kuba/gant/data/codebase/dhtmlxscheduler.js is being assigned a //# sourceMappingURL, but already has one

debug console is empty

The problem is i can’t see any data on client side

Open data/oracle.php directly in browser, does it shows valid XML ?
What is the format of dates in XML, is it expected “%Y-%m-%d %H:%i:%s” ?

Ah, why did’t i check it earlier.

<data><event id="72071"><start_date>14/05/08</start_date><end_date>14/05/08</end_date><text>59</text></event><event id="72073"><start_date>14/05/09</start_date><end_date>14/05/09</end_date><text>59</text></event><event id="72075"><start_date>14/05/09</start_date><end_date>14/05/09</end_date><text>59</text></event><event id="72077"><start_date>14/05/09</start_date><end_date>14/05/09</end_date><text>59</text></event><event id="72079"><start_date>14/05/13</start_date><end_date>14/05/13</end_date><text>59</text></event> ....

they aren’t.

Should i convert them in db table from oracle date format to string ?

It is working i changed the sql to :

$scheduler->render_sql("select ID,PIN,to_char(WEJSCIE,'YYYY-MM-DD HH24:MI:SS') WEJSCIE,to_char(WYJSCIE,'YYYY-MM-DD HH24:MI:SS') WYJSCIE from ZKA_CZAS_PRACY where WEJSCIE<WYJSCIE",'ID',"WEJSCIE,WYJSCIE,PIN");

and it’s loading everything properly

Yep, you can change the format on server side.

Or you can use the date in some custom format and change the next line in HTML code snippet

scheduler.config.xml_date="%Y-%m-%d %H:%i:%s";

Just set the expected date format here.