PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sybase_get_last_message> <sybase_field_seek
Last updated: Sun, 25 Nov 2007

view this page in

sybase_free_result

(PHP 4, PHP 5)

sybase_free_result — 추출된 데이타가 저장된 메모리를 해제한다.

Description

bool sybase_free_result ( int $result )

sybase_free_result()함수는 스크립트가 작동하는 동안에 너무 많은 메모리가 사용될 것이 걱정될 경우에만 사용되어진다. 스크립트가 끝날 경우에는 모든 결과값이 저잗되었던 메모리는 해제되기는 하지만, 인수로서 result identifier를 가진 함수 sybase_free_result()는 result identifier에 연관된 메모리를 해제 할 것이다.



add a note add a note User Contributed Notes
sybase_free_result
verdy_p at wanadoo dot fr
24-Jul-1999 03: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.

sybase_get_last_message> <sybase_field_seek
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites