hi.
db_postgre.php’m editing the file and not see the function to insert data and I would like to add events directly into the database.
I wonder what that function is done or should I use to add modify and delete data with postgresql
thank you very much for your time and collaboration
Hello,
you can use DataProcessor to send changes in the scheduler to the server. In case of using connectors events will be inserted and deleted automatically.
Please, see the sample:
dhtmlxScheduler/samples/01_initialization_loading/05_loading_mysql.html
hi again
I
use exactly the same example and I have loaded the data in postgresql
but when I insert or other operciones ised xml I get errors and I did
not record the data
My pages are like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
and the page of events.php is:
<?php
//session_start();
include ('../componentes/codebase/connector/scheduler_connector.php');
include_once('../componentes/codebase/connector/db_postgre.php');
require_once("../componentes/comunicacion.inc");
global $DB_SERVER,$DB_PORT,$DB_NAME,$DB_USER,$DB_PASSWORD;
$res = pg_connect("host=$DB_SERVER port=$DB_PORT dbname=$DB_NAME user=$DB_USER password=$DB_PASSWORD");
//$res=mysql_connect($server, $user, $pass);
//mysql_select_db($db_name);
$scheduler = new schedulerConnector($res,"Postgre");
//$scheduler->enable_log("log.txt",true);
$scheduler->render_table("eventos","id_evento","start_date,end_date,evento_nombre,detalles");
?>
and the table in postgresql is this:
CREATE TABLE eventos
(
id_evento character varying NOT NULL,
start_date timestamp without time zone,
end_date timestamp without time zone,
evento_nombre character varying,
detalles character varying,
CONSTRAINT eventos_pkey PRIMARY KEY (id_evento)
)
WITH (
OIDS=FALSE
);
ALTER TABLE eventos OWNER TO postgres;
please help me
Hello,
table field that corresponds to event id should be generated automatically. It means that you should define sequence for it.
The example:
CREATE SEQUENCE eventos_id_seq;
CREATE TABLE eventos
(
id_evento INTEGER DEFAULT NEXTVAL(‘eventos_id_seq’),
start_date timestamp without time zone,
end_date timestamp without time zone,
evento_nombre character varying,
detalles character varying,
CONSTRAINT eventos_pkey PRIMARY KEY (id_evento)
)
WITH (
OIDS=FALSE
);
ALTER TABLE eventos OWNER TO postgres;
hi
I
wonder whether you can control the insertion of each event is sent
fields know that when you save, edit or delete because I associate some
events because I have certain users in postgresql stored procedures
It is possible to define custom insert, delete and update handlers. Please see details in the documentation:
dhtmlx.com/dhxdocs/doku.php?id=d … nts_system