mysqli_get_charset> <mysqli_field_tell
Last updated: Mon, 28 Dec 2009

mysqli_free_result

result->free

(No version information available, might be only in CVS)

result->free — Libera a memória associada ao resultado

Descrição

Estilo de procedimento:

void mysqli_free_result ( object $result )

Estilo orientado a objeto (metodo):

result
void free ( void )

A função mysqli_free_result() libera a memória associada ao resultado representado pelo parâmetro result , a qual foi alocada por mysqli_query(), mysqli_store_result() ou mysqli_use_result().

Nota: Você deve sempre liberar o seu resultado com mysqli_free_result(), quando ele não for mais necessário.

Valor Retornado

Esta função não retorna nenhum valor.



User Contributed Notes
mysqli_free_result
alexander dot t dot dejong at NOSPAM dot live dot nl
20-Feb-2008 08:45
<?php
$mysqli
= new mysqli('host', 'user', 'password', 'database');
if(
mysqli_connect_errno())
{
   
trigger_error('Fout bij verbinding: '.$mysqli->error);
}

$sql = "SELECT naam FROM tabel";
if(!
$result = $mysqli->query($sql))
{
   
trigger_error('Fout in query: '.$mysqli->error);
}
else
{
    echo
'Aantal records: '.$result->num_rows;
    while(
$row = $result->fetch_assoc())
    {
        echo
$row['naam'].'<br>';
    }
}

$mysqli->free_result();
$mysqli->close();
?>

mysqli_get_charset> <mysqli_field_tell
Last updated: Mon, 28 Dec 2009