You are here

public function QPDrupalDB::prependColumn in QueryPath 6

Same name and namespace in other branches
  1. 7.3 querypath.classes.inc \QPDrupalDB::prependColumn()
  2. 7.2 querypath.classes.inc \QPDrupalDB::prependColumn()

Prepend the data from the given column into the QueryPath.

This takes the data from the given column(s) and inserts it into each element currently found in the QueryPath.

Parameters

mixed $columnName: Either a string or an array of strings. The value(s) here should match one or more column headers from the current SQL {@link query}'s results.

string $wrap: IF this is supplied, then the value or values retrieved from the database will be wrapped in this HTML/XML before being inserted into the QueryPath.

See also

QueryPath::wrap()

QueryPath::prepend()

File

./querypath.classes.inc, line 171
Classes that are part of the QueryPath module.

Class

QPDrupalDB
Add Drupal database support to QueryPath.

Code

public function prependColumn($columnName, $wrap = NULL) {
  return $this
    ->addData($columnName, 'prepend', $wrap);
}