dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] DGEE work --> Use to DGEE in DB


From: hector
Subject: [Pnet-developers] DGEE work --> Use to DGEE in DB
Date: Wed, 23 Jul 2003 10:28:38 -0400 (BOT)

Hello:

I read your e-mail of : Gopal, Chris Smith and Nicolai.

And I'm very interesting for DGEE how to work it.

But now I need work DGEE with BD.

I made a webservices in php for example:
----------------------------------------------------------------------
<?
  include("xmlprc.inc");
  include("xmlrpcs.inc");

$numero_sig = array(array($xmlrpcArray, $xmlrpcString));
$numero_doc = 'find student for id';

function numero($m) {

    global $xmlrpcerruser, $s;
    xmlrpc_debugmsg("find student for ru");

    $xa  = $m->getParam(0);
    $a   = $xa ->scalarval();
    $err = "";
    $v   = new xmlrpcval();

    $conn = pg_connect("localhost","","","","test");
    $r = "
           select * from alm_programas
                    where id_facultad='$a' and activo ='A'";

    $res = pg_exec($conn, $r);

    $filas = pg_numrows($res);
    $salArr = array();

    for ($i=0; $i<$filas; $i++) {
       $datos = pg_fech_object($res,$i);
       $salArr[] = new xmlrpcval(array("id_programa" =>
                                       new xmlrpcval($datos->id_programa),
                                       "programa" =>
                                       new xmlrpcval($datos->programa),
                                       "activo" =>
                                       new xmlrpcval($datos->activo),
                                       ), "struct");
    }

    $v-> addArray($salArr);

    if ($err) {
          return new xmlrpcresp(0, $xmlrpcerruser, $err);
    }
    else {
          return new xmlrpcresp($v);
    }

}

//-------------------------------------------
$s = new xmlrpc_server(array(
                            "examples.numero" =>
                                array("function" => "numero",
                                      "signature" => $numero_sig,
                                      "docstring" => $numero_doc,
                             )
                       );
?>
-------------------------------------------------------------------
Well this webservices in php run.
But
I want to do it in DGEE. I can connect to database and return strings
values, but I don't know HOW I do it in DGEE, because I don't know how use
or implementate this arrays dinamics.


Help me.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]