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(someth ing) from a.b';
$stid = oci_parse($conn X, $query);
if (!$stid) {
$e = oci_error($conn X);
print htmlentities($e['message']);
exit;
}
$r = oci_execute($st id, 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_NULL S))
{
print '<tr>';
print "<td>".(count($ row))."</td>";
foreach ($row as $item) {
print '<td>'.$item.' </td>';
}
print '</tr>';
}
print '</table>';
oci_close($conn X);
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(someth ing) from a.b';
$stid = oci_parse($conn X, $query);
if (!$stid) {
$e = oci_error($conn X);
print htmlentities($e['message']);
exit;
}
$r = oci_execute($st id, 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_NULL S))
{
print '<tr>';
print "<td>".(count($ row))."</td>";
foreach ($row as $item) {
print '<td>'.$item.' </td>';
}
print '</tr>';
}
print '</table>';
oci_close($conn X);
Comment