In my module, I was trying to make use of db_or() in this way...
$filterSparten = db_select($this->tbl_hat_sparte, 'hs')
->fields('hs', array('hat_AID'));
$or = db_or();
foreach($_GET['tags'] as $tag) {
$or->condition('hat_KID', $tag);
}
$filterSparten->condition($or)
->execute()
->fetchAssoc();
...which, unfortunately, only returns a SelectQuery-object:
SelectQuery Object
(
[fields:protected] => Array
(
[hat_AID] => Array
(...
Why doesn't my code return a fetched results-object? I have compared it several times with the examples on the Drupal-pages, but I can't help myself with it.
db_or
is it return correctly? – Yuseferi Nov 28 '15 at 17:44