twigletmac wrote:Could we see some of the code you use for retrieving and displaying the image?
Mac
Hi twigletmac. Thanks for your anser. I use this function (query) to retrieve data. THEN basically, when i get the data (whichever type it be) i show it using 'ECHO' instruction. Echo works fine with numbers, strings, dates, but when data type is LONG RAW it shows a group of 'rare characters'.
Here is the function:
function query($Pv_Query, $Pv_EsTrans=FALSE, $Pa_VarQuery=array()) {
/*Executes a query, we use 3 parameters: first one is the string of the query,*/
/*the second one is TRUE/FALSE, indicating if it is a transaction or a select, */
/*third one is an array of a parameters for the query, it has Oracle variables*/
/*as keys, and data are Php variables*/
$La_Result = array();
$La_Result["error"] = TRUE;
$Ln_Stmt = @OCIParse($this->get_cx(), $Pv_Query);
// if a parsing error, we register the error
if (! $Ln_Stmt) {
$err = OCIError($this->get_cx());
$this->error = "Parsing:".$err[ "code" ].":".$err[ "message" ]."\n";
}
// if an execution error, it generates an error and stops
else{
if ( count($Pa_VarQuery) ) {
$La_Valores = array();
$j = 0;
for ($i=0; $i<count($Pa_VarQuery); $i++)
{
list($Lv_OciVar,$PhpVar) = each($Pa_VarQuery);
$La_Valores[$j] = $PhpVar;
OCIBindByName($Ln_Stmt, $Lv_OciVar, $La_Valores[$j]);
$j++;
}
}
if (! @OCIExecute($Ln_Stmt)) {
$err = OCIError($Ln_Stmt);
$this->error = "Ejecución:".$err[ "code" ].": ".$err[ "message" ]."\n";
//echo $Pv_Query;
echo $this->error;
}
else{
// no transaction nor parsing error
$La_Result["error"] = FALSE;
//DATA extraction, if it's not a transaction
if (! $Pv_EsTrans ){
while ( OCIFetchInto($Ln_Stmt,&$La_Valores, OCI_ASSOC+OCI_RETURN_NULLS) ) {
$La_Result["valores"][] = $La_Valores;
}
}
}
}
return $La_Result;
}
To show the image i just do:
echo "Image ".$La_Result["valores"][0]["PHOTO"];
Please tell me.