Subject Re: [ib-support] ibase_fetch_* - Functions
Author Paul Reeves
Bernhard Döbler wrote:
>
> Hi,
>
> I again have a PHP Problem. I copied a (working) script to another
> (production) server in the same domain so I expected it to run without
> problems. Sadly it does not.
> I connect do the Database and query it. No problem.
> I for the first time call either ibase_fetch_object() or
> ibase_fetch_row(). Also no problem. But when I for the second time call
> either function the system hangs.

I don't think we have enough information to go on. I can't think of a reason
why the system should hang on the second fetch.

> So my question is how Interbase processes a query (it's result)? Is the
> complete result (recordset) transmited to the client hence the problem is
> the server I copied the script to, or is is the resultset stored on the
> server and there are somehow problems retrieving further records from
> the result on the InterbaseServer-machine?
>

I am not sure that either of your suppositions are correct. If the result is
from a straightforward 'select * from mytable where blah=x' and InterBase can
either pull rows off in natural order, or via an index then it will send them
one by one as the application asks for them. (ie, makes a fetch call)

Under some circumstances - an 'order by' on a non-indexed field, for example,
InterBase will have to prepare the entire result set on the server before it
can start sending the first record.

Whatever the case, if the result set is being sent via tcp/ip there is some
buffering done - each packet is filled with as many records as possible and
the client library (gds or gds32) manages this 'local' buffer.

I should double check your script for dependancies on a particular host, as
well as check that the new host really is configured in a similar manner to
the old host.


Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further