Function Database_super_mysql->query_may_run

Definitions

sources/database/shared/mysql.php

  • Find if a database query may run, showing errors if it cannot.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$query string No No required parameter N/A N/A The complete SQL query
$connection mixed No No required parameter N/A N/A The DB connection
$get_insert_id boolean No No required parameter N/A N/A Whether to get the autoincrement ID created for an insert query

Returns

  • Whether it can
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find if a database query may run, showing errors if it cannot.
 *
 * @param  string $query The complete SQL query
 * @param  mixed $connection The DB connection
 * @param  boolean $get_insert_id Whether to get the autoincrement ID created for an insert query
 * @return boolean Whether it can
 */

public function query_may_run(string $query, $connection, bool $get_insert_id) : bool