You are here

public function QPDrupalDB::appendColumn in QueryPath 6

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

Append the data in the given column(s) to the QueryPath.

This appends data to every item in the current QueryPath. The data will be retrieved from the database result, using $columnName as the key.

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::append()

File

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

Class

QPDrupalDB
Add Drupal database support to QueryPath.

Code

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