Subject | Re: [firebird-php] Strange browser error |
---|---|
Author | Umberto Masotti |
Post date | 2011-07-03T08:32:24Z |
Hi Sakhile,
On 03/07/2011 09:07, Sakhile Njoko wrote:
> while ($rec=ibase_fetch_object($rsl)) {
> echo $rec->DPTNM."<br />";
> }
I'd say that missing object should be that DPTNM isn't a field for DPMT
table.
Perhaps should you try to check your fields names:
echo "<table><tbody>"
$ii = 0;
while ($rec=ibase_fetch_assoc($rsl)) {
echo "<tr>";
if($ii==0) {
foreach ($rec as $nm => $val) {
echo "<th>$nm</th>";
++$ii;
echo "</tr><tr>"
}
foreach ($rec as $nm => $val)
echo "<td>$val</td>";
echo "</tr>";
}
If field name is printed lowercase or mixed case, you should use proper
case, as $rec->dptnm because object names are case sensitive.
Ciao.
Mimmo.