On Fri, 2002-08-23 at 00:24, Timm Friebe wrote:
> On Wed, 2002-08-21 at 10:22, Timm Friebe wrote:
> [...]
[...]
> 3) I had a look at the memory thing (although "unbuffered", all rows
> that have been read will reside in memory until sybase_free_result()
> is called). Changing this would make seeking backwards impossible:
>
> $q= sybase_query('...');
> sybase_data_seek($q, 3); // Seek forward to row #4
> // [...]
> sybase_data_seek($q, 0); // Seek back to first row
>
> If this isn't needed with sybase_unbuffered_query() I'd (try to:-))
> change the implementation to free the memory used after each call to
> any of the sybase_fetch_* functions and document this behaviour
> accordingly.
Here[1] is a quickhack for a version of sybase_unbuffered_query which
only uses memory for exactly one resultset.
Call it like this:
$q= sybase_unbuffered_query($sql, $dbh, FALSE);
The third parameter (bool store_result) is only available in
sybase_unbuffered_query() - it of course doesn't make sense for buffered
queries - is optional and default to TRUE (which is the current
behaviour).
The newest source can be found at
http://sitten-polizei.de/php/php_sybase_ct.c and
http://sitten-polizei.de/php/php_sybase_ct.h
(Download both, the header file has changed!)
--
Timm
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php