Subject Re: [firebird-support] Weird php and firebird problem, repeating values
Author Lester Caine
Fabio Gomes wrote:

> I dont think so, i used the same function for years with mysql and i use the
> same code with a LOT of firebird code, and just with THIS table i have this
> problem.

And I STILL think it is due to using '*' !
Obviously one of the un-named fields that is being returned is giving a
problem. So the starting point is always to check the ACTUAL fields that
you want returned ;)

> I already tried to change my code to:
>
> $var = ibase_query($id, $sql);
>
> while($results = ibase_fetch_assoc($var)) {
> echo $results['blablabla'];
> }
>
> but i get the same repeated values :(

So drop the '*' in that and try adding known field names until the
problem returns then we will know WHAT is causing the problem.

> i ve tried a lot of things, but none have worked, but in the ibwebadmin my
> query return the correct value :(
>
> But if you wanna see my code, i ve posted it here:
>
> http://www.phpbuilder.com/board/showthread.php?t=10313979

I would be starting but dropping a print_r($items); after consulta() and
checking what the array is actually populated with, but testing things
in isolation above would be a better starting point :)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.