db_placeholders

  1. drupal
    1. drupal6 database.inc
    2. drupal7
Versionen
drupal6 – drupal7 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

@todo This may be possible to remove in favor of db_select().

Übergabeparameter

$arguments An array with at least one element.

$type The Schema API type of a field (e.g. 'int', 'text', or 'varchar').

Verwandte Themen

▾ 2 functions call db_placeholders()

blogapi_mt_validate_terms in modules/blogapi/blogapi.module
Blogging API helper - find allowed taxonomy terms for a node type.
_block_load_blocks in modules/block/block.module
Load blocks information from the database.

Code

includes/database/database.inc, line 2034

<?php
function db_placeholders($arguments, $type = 'int') {
  $placeholder = db_type_placeholder($type);
  return implode(',', array_fill(0, count($arguments), $placeholder));
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen