43 $qb = $this->handler->db2->createXoopsQueryBuilder();
46 if (is_array($fields) && count($fields) > 0) {
47 if (!in_array($this->handler->keyName, $fields)) {
48 $fields[] = $this->handler->keyName;
51 foreach ($fields as $field) {
56 $qb->addSelect($field);
62 $qb->from($this->handler->table, null);
73 while ($myrow =
$result->fetch(\PDO::FETCH_ASSOC)) {
74 $object = $this->handler->create(
false);
75 $object->assignVars($myrow);
77 $ret[$myrow[$this->handler->keyName]] = $object;
84 $object = $this->handler->create(
false);
85 while ($myrow =
$result->fetch(\PDO::FETCH_ASSOC)) {
86 $object->assignVars($myrow);
88 $ret[$myrow[$this->handler->keyName]] = $object->getValues();
90 $ret[] = $object->getValues();
127 $qb = $this->handler->db2->createXoopsQueryBuilder();
132 $qb->select($this->handler->keyName);
133 if (!empty($this->handler->identifierName)) {
134 $qb->addSelect($this->handler->identifierName);
136 $qb->from($this->handler->table, null);
137 $qb->orderBy($this->handler->keyName);
147 while ($myrow =
$result->fetch(\PDO::FETCH_ASSOC)) {
149 $ret[$myrow[$this->handler->keyName]] = empty($this->handler->identifierName) ? 1
150 :
$myts->htmlSpecialChars($myrow[$this->handler->identifierName]);
165 $qb = $this->handler->db2->createXoopsQueryBuilder();
170 $qb->select($this->handler->keyName);
171 $qb->from($this->handler->table, null);
172 $sql =
"SELECT `{$this->handler->keyName}` FROM `{$this->handler->table}`";
182 while ($myrow =
$result->fetch(\PDO::FETCH_ASSOC)) {
183 $ret[] = $myrow[$this->handler->keyName];
getIds(CriteriaElement $criteria=null)
getAll(CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
getObjects(CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
getList(CriteriaElement $criteria=null, $limit=0, $start=0)