condition

  1. drupal
    1. drupal7
Versionen
drupal7 public QueryConditionInterface::condition($field, $value = NULL, $operator = NULL)

Helper function to build most common conditional clauses.

This method can take a variable number of parameters. If called with two parameters, they are taken as $field and $value with $operator having a value of =.

Übergabeparameter

$field The name of the field to check.

$value The value to test the field against. In most cases, this is a scalar. For more complex options, it is an array. The meaning of each element in the array is dependent on the $operator.

$operator The comparison operator, such as =, <, or >=. It also accepts more complex options such as IN, LIKE, or BETWEEN.

$num_args For internal use only. This argument is used to track the recursive calls when processing complex conditions.

Rückgabewert

The called object.

Verwandte Themen

Code

includes/database/query.inc, line 41

<?php
public function condition($field, $value = NULL, $operator = NULL);
?>

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