PHP Doku:: Frees result memory - function.sybase-free-result.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenSybaseSybase Funktionensybase_free_result

Ein Service von Reinhard Neidl - Webprogrammierung.

Sybase Funktionen

<<sybase_field_seek

sybase_get_last_message>>

sybase_free_result

(PHP 4, PHP 5)

sybase_free_resultFrees result memory

Beschreibung

bool sybase_free_result ( resource $result )

sybase_free_result() only needs to be called if you are worried about using too much memory while your script is running. All result memory will automatically be freed when the script ends. You may call sybase_free_result() with the result identifier as an argument and the associated result memory will be freed.

Parameter-Liste

result

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
verdy_p at wanadoo dot fr
25.07.1999 0:10
When processing queries that return MANY rows, and when you put a limit on the number of rows you fetch from the result set, you should always call this function to close the current result set, because the SQL server may still be pending waiting for other rows to be fetched by your script. When you call this function, the Sybase client in PHP3 will signal to Sybase SQL Server that other pending results can be ignored, and the SQL server connection will return faster to the "waiting command" state, instead of keeping in the "suspend" state, saving much resources on the SQL-Server. In fact, it is  a good idea to call this function after all your queries to save up SQL server resources.
Note that when processing SQL batchs with multiple queries, and stored procedure calls that return multiple result sets, there's no provision here to let the server return the next result set. There should be another function like sybase_next_result() to close the current result set, and let the SQL server go on the next SQL statements. Such a function would return a status that indicates if further results are coming or if the query is really terminated.



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)