SQLite3Result::finalize

(PHP 5 >= 5.3.0)

SQLite3Result::finalizeCloses the result set

Description

public bool SQLite3Result::finalize ( void )

Closes the result set.

Parameters

This function has no parameters.

Return Values

Returns TRUE.

Коментарии

Автор:
A simple example using finalize().

// Open the database connection
$db = new SQLite3('database.db');

// Prepare a query for execution
$query = $db->prepare('SELECT user_id FROM users WHERE username=:username');
$query->bindValue(':username', $_COOKIE['username'], SQLITE3_TEXT);

// Execute the query
$result = $query->execute();

// Store the result of the query
$id = $result->fetchArray(SQLITE3_NUM)[0];

// Close the result set and database connection
$result->finalize();
$db->close();

Of course you should be more careful and clean your cookie, etc.
2016-09-16 06:16:36
http://php5.kiev.ua/manual/ru/sqlite3result.finalize.html

    Поддержать сайт на родительском проекте КГБ