PHP Doku:: Frees the memory associated with a result - mysqli-result.free.html

Verlauf / Chronik / History: (2) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenMySQL Improved ExtensionThe MySQLi_Result classmysqli_result::free -- mysqli_free_result

Ein Service von Reinhard Neidl - Webprogrammierung.

The MySQLi_Result class

<<mysqli_result::field_seek -- mysqli_field_seek

mysqli_result->lengths -- mysqli_fetch_lengths>>

mysqli_result::free

mysqli_free_result

(PHP 5)

mysqli_result::free -- mysqli_free_resultFrees the memory associated with a result

Beschreibung

Objektorientierter Stil

void mysqli_result::free ( void )
void mysqli_result::close ( void )
void mysqli_result::free_result ( void )

Prozeduraler Stil

void mysqli_free_result ( mysqli_result $result )

Frees the memory associated with the result.

Hinweis:

You should always free your result with mysqli_free_result(), when your result object is not needed anymore.

Parameter-Liste

result

Nur bei prozeduralem Aufruf: Ein von mysqli_query(), mysqli_store_result() oder mysqli_use_result() zurückgegebenes Ergebnisobjekt.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Siehe auch


2 BenutzerBeiträge:
- Beiträge aktualisieren...
Vector at ionisis dot com
29.12.2009 2:17
If you are getting this error:
Internal SQL Bug: 2014, Commands out of sync; you can't run this command now

Then you never called mysqli_result::free(), mysqli_result::free_result(), mysqli_result::close(), or mysqli_free_result() in your script, and must call it before executing another stored procedure.
Anonymous
19.10.2009 0:49
Freeing the memory associated with a result means that the references returned by mysqli_fetch_object (or equivalent) are cleared. Thus if you should pass an object pointing to a database row _by reference_, every call of mysqli_free_result will discard the referenced data.



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",...)