Function Database_Static_mysqli->get_connection

Definitions

sources/database/mysqli.php

  • Get a database connection. This function shouldn't be used by you, as a connection to the database is established automatically.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$persistent boolean required parameter N/A N/A Whether to create a persistent connection
$db_name string required parameter N/A N/A The database name
$db_host string required parameter N/A N/A The database host (the server)
$db_user string required parameter N/A N/A The database connection username
$db_password string required parameter N/A N/A The database connection password
$fail_ok boolean False N/A N/A Whether to on error echo an error and return with a null, rather than giving a critical error

Return

  • A database connection (note for this driver, it's actually a pair, containing the database name too: because we need to select the name before each query on the connection) (null: error)
  • Type: ?mixed
  • Set: N/A
  • Range: N/A