function db_placeholders
6.x database.inc | db_placeholders($arguments, $type = 'int') |
Generate placeholders for an array of query arguments of a single type.
Given a Schema API field type, return correct %-placeholders to embed in a query
Parameters
$arguments: An array with at least one element.
$type: The Schema API type of a field (e.g. 'int', 'text', or 'varchar').
Related topics
9 calls to db_placeholders()
- block_list in drupal-6.x/
modules/ block/ block.module - Return all blocks in the specified region for the current user.
- block_user in drupal-6.x/
modules/ block/ block.module - Implementation of hook_user().
- blogapi_mt_validate_terms in drupal-6.x/
modules/ blogapi/ blogapi.module - Blogging API helper - find allowed taxonomy terms for a node type.
- locale_batch_by_language in drupal-6.x/
includes/ locale.inc - Prepare a batch to import translations for all enabled modules in a given language.
- system_theme_data in drupal-6.x/
modules/ system/ system.module - Collect data about all currently available themes.
File
- drupal-6.x/
includes/ database.inc, line 251 - Wrapper for database interface code.
Code
function db_placeholders($arguments, $type = 'int') {
$placeholder = db_type_placeholder($type);
return implode(',', array_fill(0, count($arguments), $placeholder));
}