You are here

public function QPDrupalDB::query in QueryPath 6

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

File

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

Class

QPDrupalDB
Add Drupal database support to QueryPath.

Code

public function query($sql) {
  $args = func_get_args();
  array_shift($args);

  // If first item is an array, set args to that array.
  if (!empty($args) && is_array($args[0])) {
    $args = $args[0];
  }
  $this->results = db_query($sql, $args);
  return $this->qp;
}