Está en la página 1de 1

<?php $conexin = oci_connect('dbmanager', '1234', 'localhost/XE'); if (!

$conexin) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // Preparar la sentencia $stid = oci_parse($conexin, 'SELECT HIS_FECHA, HIS_DESCRIPCION FROM historia'); if (!$stid) { $e = oci_error($conexin); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // Realizar la lgica de la consulta $r = oci_execute($stid); if (!$r) { $e = oci_error($stid); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // Obtener los resultados de la consulta print "<table>\n"; print "<tr><td> Fecha </td> <td> <strong>Sucesos</strong> </td>"; while ($fila = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { print "<tr> \n"; foreach ($fila as $elemento) { print " <td>" . ($elemento !== null ? htmlentities($elemento, ENT_QUO TES) : "") . "</td>\n"; } print "</tr>\n"; } print "</table>\n"; oci_free_statement($stid); oci_close($conexin); ?>

lo quit del codigo: while ($row = oci_fetch_assoc($sql)) echo $row['CITY'] . "<br>"; while ($row = oci_fetch_assoc($sql)) echo "<a href='#'>".$row['CAT_NOMBRE'] ."</a>" ."<br>"; S.CAT_ID_CATEGORIA_FK while ($row = oci_fetch_array($sql)) echo "<a href='".$row['CAT_NOMBRE'].".php'".">". $row['CAT_NOMBRE']."</a>"."<br/ >";

También podría gustarte