diff --git a/php/src/db/Capacitor.php b/php/src/db/Capacitor.php index d09f2e0..7162b44 100644 --- a/php/src/db/Capacitor.php +++ b/php/src/db/Capacitor.php @@ -1,6 +1,7 @@ channel->getPrimaryKeys(); + $select = "select"; + if (A::pop($params, "distinct")) $select .= " distinct"; return $this->storage->db()->all(cl::merge([ - "select", + $select, "from" => $this->getTableName(), ], $query), $params, $primaryKeys); } function dbOne(array $query, ?array $params=null): ?array { + $select = "select"; + if (A::pop($params, "distinct")) $select .= " distinct"; return $this->storage->db()->one(cl::merge([ - "select", + $select, "from" => $this->getTableName(), ], $query), $params); }