[amfphp-1.0.1 + pdo + oracle] flash non legge il recorset
Ho un'applicazione php che si connette ad un database oracle tramite pdo
Ho installato amfphp v.1.0.1
Non riesco a far restituire a flash il recorset da php
la connessione la fa con successo, e anche la funzione getTest... ma come alla funzione php faccio restituire il recorset non fuziona più niente
Il codice è
PHP:
****************************
php code:
include_once ("db_layer.php"); // class pdo connection
class SelectorService extends db_layer{
function SelectorService() {
$this->methodTable = array(
"getTest" => array(
"description" => "Returns a Test",
"access" => "remote",
"arguments" => array ("arg1","arg2")
),
"getCombo1" => array(
"description" => "Returns Combo 1",
"access" => "remote",
"arguments" => array ("visualizzaParam")
)
);
//open connection
$this->isConn(); // include in db_layer
}
function getTest($testValue1,$testValue2)
{return " TEST " . $testValue1 . " " . $testValue2;}
function getCombo1($visualizzaParam)
{
$querySql = strtoupper("SELECT distinct(r1.oggetto_uno),r1.id_key_uno from keyword k, repository_uno r1 where r1.id_key_uno=k.id_key_uno and k.id_visualizza = '".$visualizzaParam."' order by r1.oggetto_uno");
$ris = $this->eseguiQuery($querySql);
//return $querySql ;
return $ris;
}
}
******************************
class db_layer {
...................
function isConn()
{
//setto le variabili
$this ->setPrefixAndPath();
$this -> setVarConn ();
if ($this->connessione=="" || $this->connessione==false)
{
//echo "CONNESSIONE CHIUSA
";
//setto le variabili
$this ->setPrefixAndPath();
$this -> setVarConn ();
//apro la conn
$this ->apriConn();
//seleziono il database
// $this ->scelta_db();
}
}
//funzione che effettua la connessione
function apriConn()
{
try {
$this->connessione = new PDO("oci://dbname={$this->dbhost}:1521/{$this->dbname};charset=UTF-8", $this->dbuser,$this->dbpass);
}
catch (PDOException $e)
{echo "Errore : " . $e-> getCode() . " ". $e->getMessage();}
}
//Funzione che chiude la connessione
function chiudoConn()
{
if ($this->connessione!="" || $this->connessione!=false)
{$this->connessione=null;}
}
function eseguiQuery($query)
{
$ris = $this->connessione->query($query);
return $ris;
}
.................
}
****************************
flash code:
_root.gatewayUrl = "http://localhost/Stinet/selectordev/gateway.php";
_root.getVisualizzaReply = new Object();
_root.getCombo1 = new Object();
getVisualizzaReply.onResult = function(result)
{trace ("son qui " + result);}
getCombo1.onResult = function(result)
{
trace ("son qui " );
// trace("server responded for Combo 1: Records: " + result.getLength());
}
getCombo1.onStatus = function ( data ) {
trace("an error occurred")
trace("in line: " + data.line)
trace("error level: " + data.level)
trace("description: " + data.description);
}
if (isGatewayOpen == null)
{
isGatewayOpen = true;
NetServices.setDefaultGatewayUrl(_root.gatewayUrl) ;
gatewayConnnection = NetServices.createGatewayConnection();
selectorService = gatewayConnnection.getService("SelectorService");
trace("getTest");
selectorService.getTest(getVisualizzaReply,"test", "test");
trace ("getComb01");
selectorService.getCombo1(getVisualizzaReply, "01");
}
AIUTOOOOOOOO!!!!!
prima l'applicazione girarava perfettamente su amfphp v.0.9 e utilizzava una connessione mysql ... ora ho dovuto migrare su oracle e di conseguenza ho implementato il pdo ... ma flash mi ha messo in crisi