public function QPDrupalDB::queryInto in QueryPath 6
Same name and namespace in other branches
- 7.3 querypath.classes.inc \QPDrupalDB::queryInto()
- 7.2 querypath.classes.inc \QPDrupalDB::queryInto()
This needs some fixing up to be as grand as QPDB's version.
File
- ./
querypath.classes.inc, line 56 - Classes that are part of the QueryPath module.
Class
- QPDrupalDB
- Add Drupal database support to QueryPath.
Code
public function queryInto($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];
}
$results = db_query($sql, $args);
while ($row = db_fetch_array($result)) {
foreach ($row as $datum) {
$this->qp
->append($datum);
}
}
return $this->qp;
}