目录

PHP mysqli refresh() 函数

❮ PHP mysqli 参考


定义和用法

该 refresh() / mysqli_refresh() 函数刷新/刷新表或缓存,或重置复制服务器信息。


语法

面向对象风格:

$mysqli -> refresh( options)

程序风格:

mysqli_refresh( connection, options)

参数值

Parameter Description
connection Required. Specifies the MySQL connection to use
options The options to refresh. Can be one of more of the following (separated by OR):
  • MYSQLI_REFRESH_GRANT - Refreshes the grant tables
  • MYSQLI_REFRESH_LOG - Flushes the logs
  • MYSQLI_REFRESH_TABLES - Flushes the table cache
  • MYSQLI_REFRESH_HOSTS - Flushes the host cache
  • MYSQLI_REFRESH_STATUS - Resets the status variables
  • MYSQLI_REFRESH_THREADS - Flushes the thread cache
  • MYSQLI_REFRESH_SLAVE - Resets the master server info, and restarts the slave
  • MYSQLI_REFRESH_MASTER - Removes the binary log files in the binary log index, and truncates the index file

技术细节

返回值: 成功则为真。失败时为 FALSE
PHP 版本: 5.3+

❮ PHP mysqli 参考