You are here: New to OCI - double results? « PHP Programming Language « IT news, forums, messages
New to OCI - double results?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация