Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2012, 11:01
ib3xn0
 
Fecha de Ingreso: febrero-2008
Mensajes: 178
Antigüedad: 16 años, 2 meses
Puntos: 1
htmlentities() expects parameter 1 to be string

Buenas tardes.
Estoy realizando una consulta desde PHP a oracle 11g donde si me conecta correctamente pero en el resultado de la consulta me muestra el siguiente error:

Warning: htmlentities() expects parameter 1 to be string, object given in

y a continuación del error la consulta correctamente.

incluyo el código:
Código PHP:
<?php

$conn 
oci_connect('usuario''contraseña''bbdd''AL32UTF8');
if (!
$conn) {
    
$e oci_error();
    
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}

$stid oci_parse($conn"SELECT * FROM mi_tabla");
oci_execute($stid);

echo 
"<table border='1'>\n";
while (
$row oci_fetch_array($stidOCI_ASSOC+OCI_RETURN_NULLS)) {
    echo 
"<tr>\n";
    foreach (
$row as $item) {
        echo 
"    <td>" . ($item !== null htmlentities($itemENT_QUOTES) : "&nbsp;") . "</td>\n";
    }
    echo 
"</tr>\n";
}
echo 
"</table>\n";

?>
Gracias, un saludo.