Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by diego on Dec 28, 2009 16:18
open dhtmlx forum
insert in postgresql

Hi everybody

I wonder how I can insert data into postgresql. look at the examples but none deals with data in a postgresql database and moreover none controls the data before being sent to review the methods but the examples do not say much

there is any way to send the data manually as I have to send Call Stuff as user data and profile that the system acces

the page that draws the sigiente schedule this way:

function init() {
        

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

        scheduler.config.lightbox.sections=[    

            {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},

            {name:"location", height:43, type:"textarea", map_to:"details" },

            {name:"time", height:72, type:"time", map_to:"auto"}

        ]

        scheduler.config.first_hour=4;

        scheduler.locale.labels.section_location="Location";




        scheduler.init('scheduler_here',null,"month");

        scheduler.load("events.php?uid="+scheduler.uid());

    }


and events.php page has the following:

<?php
    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");

    $scheduler = new schedulerConnector($res,"Postgre");

    $scheduler->render_table("eventos","id_evento","start_date,end_date,evento_nombre,detalles");

?>

thank you very much for your time and dedication and the help I can provide and happy holidays
Answer posted by Alex (support) on Jan 04, 2010 02:29

Hello,

the provided server-side code looks correct. But if you want to send scheduler changes to the server-side automatically, dataProcessor should be enabled. Please, see the sample for mysql in the scheduler package (the client-side is the same as for postgresql):

dhtmlxScheduler/samples/01_initialization_loading/05_loading_mysql.html