Hi, when I am trying to connect to an Oracle DB, using the 01_basic_init_connector.php, rewritten as follows:
include $_SERVER[‘DOCUMENT_ROOT’].“sh/mod/start.inc.php”;
include (‘…/config.php’);
include (‘…/…/codebase/scheduler_connector.php’);
echo "<pre>UserID = ".$user['UID']."\n";
// $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
// mysql_select_db($mysql_db);
$res = oci_connect(‘ops$pastrade’, “pastrade”, “apol-sa03/apop”);
echo “1\n”;
#$res=mysql_connect(“localhost”,“root”,“”);
mysql_select_db(“test”);
$scheduler = new schedulerConnector($res);
echo "2\n";
$scheduler->enable_log("log.txt",true);
$scheduler->render_table("apk_usr_agenda","apk_uag_id","startzeit,endzeit,event_title,notizen");
echo "3";
I get as an output:
UserID = 5
1
2
====================================
Log started, 17/05/2016 11:05:14
SELECT startzeit
FROM apk_usr_agenda
mysql_query(): supplied resource is not a valid MySQL-Link resource at C:\Apache24\htdocs\crm-dev\public\scheduler\codebase\db_common.php line 964
mysql_error(): supplied resource is not a valid MySQL-Link resource at C:\Apache24\htdocs\crm-dev\public\scheduler\codebase\db_common.php line 965
!!!Uncaught Exception
Code: 0
Message: MySQL operation failed
I am sure that I’m doing something wrong… what?
Oracle DB structure:
SQL> desc apk_usr_agenda
Name Null? Type
APK_UAG_ID NOT NULL NUMBER(15)
APK_USR_ID NOT NULL NUMBER(15)
APK_CON_ID NUMBER(15)
APK_CMP_ID NUMBER(15)
APK_KTY_ID NUMBER(15)
EVENT_TITLE NOT NULL VARCHAR2(255)
STARTZEIT NOT NULL DATE
ENDZEIT DATE
CONTACT_DATA VARCHAR2(100)
NOTIZEN CLOB
CREATION_DATE NOT NULL DATE
CREATED_BY NOT NULL VARCHAR2(30)
LAST_UPDATE_DATE NOT NULL DATE
LAST_UPDATED_BY NOT NULL VARCHAR2(30)
APK_UAG_UAG_ID NUMBER(15)
PRIVATE NOT NULL NUMBER(1)