Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<mysqli::reap_async_querymysqli::release_savepoint>
^mysqliLast updated: Mon, 26 Oct 2026

mysqli::refresh

mysqli_refresh

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

mysqli::refresh -- mysqli_refresh — Refreshes

Warning

This function has been DEPRECATED as of PHP 8.4.0. Relying on this function is highly discouraged.

Description

Object-oriented style

#[\Deprecated(
    since: '8.4',
    message: 'use FLUSH SQL statement instead',
)]

public function mysqli::refresh(int $flags): bool

Procedural style

#[\Deprecated(
    since: '8.4',
    message: 'use FLUSH SQL statement instead',
)]

function mysqli_refresh(mysqli $mysql, int $flags): bool

Flushes tables or caches, or resets the replication server information.

Parameters

mysql

Procedural style only: A mysqli object returned by mysqli_connect() or mysqli_init()

flags

The options to refresh, using the MYSQLI_REFRESH_* constants as documented within the MySQLi constants documentation.

See also the official » MySQL Refresh documentation.

Return Values

true if the refresh was a success, otherwise false

Changelog

Version Description
8.4.0 Both mysqli::refresh() and mysqli_refresh() are now deprecated. Use FLUSH SQL commands instead.

See Also


<mysqli::reap_async_querymysqli::release_savepoint>
^mysqliLast updated: Mon, 26 Oct 2026