db_quote From Online Manual

Jump to: navigation, search

Usage:

$smcFunc['db_quote'] (query, values, connection)


Description: Formats the query as db_query does, but it does not execute the query. Used to prepare parts of query to be used later on.

Parameters:

  • query the query (or part of it) to be formatted
  • values is an array of values you are intending to use in the query.
  • connection the database connection to be used.

Return: a string representing the formatted query.

Example:

$realNameMatches[] = $smcFunc['db_quote'](
	'{string:possible_user}',
	array(
		'possible_user' => $possible_user
	)
);



Advertisement: