|
Posted by Sonnich on 01/26/07 16:52
Hello there
I'm trying to work with the example for OCI... and the $row returns 2
values, the same twice, but my query only have one... code below.
Can anyone explain?
BR
S
$query = 'select distinct(something) from a.b';
$stid = oci_parse($connX, $query);
if (!$stid) {
$e = oci_error($connX);
print htmlentities($e['message']);
exit;
}
$r = oci_execute($stid, OCI_DEFAULT);
if (!$r) {
$e = oci_error($stid);
echo htmlentities($e['message']);
exit;
}
print '<table border="1">';
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS))
{
print '<tr>';
print "<td>".(count($row))."</td>";
foreach ($row as $item) {
print '<td>'.$item.'</td>';
}
print '</tr>';
}
print '</table>';
oci_close($connX);
Navigation:
[Reply to this message]
|