Brimbox Logo Brimbox Version 2.3.4 Released

query_params>>

Method to execute query prepared with parametrized array.

Class: bb_database, called as $main

File: bb_database.php (php)

Declaration:

function query_params($con, $query, $array, $display = true)

Usage:

$result = $main->query_params($con, $query, $array, $display);

Returns: Resultset from valid database query.

Note: by default this function will not result in a PHP die() on error. Must set $display to false to stop the last Postgres error from being displayed. This function designed for easy debugging, use pg_query_params for standard behavior.

Parameter: $con (database connector)
Valid database connection

Parameter: $query (string)
Valid database query with Postgres placeholders (ie $1, $2…$n) for escaped array substitution.

Parameter: $array (array)
Array to be escaped and substituted into query.

Parameter: $display (boolean)
Used for debugging, will die with query submitted on error.

Updated: 2016-07-09