Function DatabaseConnector->table_is_locked

Definitions

sources/database.php

  • Wait up to 5 iterations for a table to be unlocked (if it is locked).Only works with MySQL/MyISAM (and irrelevant for other DBs which don't do table-level locking).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table ID_TEXT No No required parameter N/A N/A The table name

Returns

  • Whether the table was still locked after trying 5 times
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Wait up to 5 iterations for a table to be unlocked (if it is locked).Only works with MySQL/MyISAM (and irrelevant for other DBs which don't do table-level locking).
 *
 * @param  ID_TEXT $table The table name
 * @return boolean Whether the table was still locked after trying 5 times
 */

public function table_is_locked(string $table) : bool