# Class PDO in einer Components-Datei

**URL:** <https://forum.shopware.com/t/class-pdo-in-einer-components-datei/54804>\
**Category:** Programmierung\
**Created:** [24. August 2018 um 20:14 UTC](https://forum.shopware.com/t/class-pdo-in-einer-components-datei/54804 "2018-08-24T20:14:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![webarbeit](https://avatars.discourse-cdn.com/v4/letter/w/b487fb/32.png) [@webarbeit](https://forum.shopware.com/u/webarbeit)\
**Post date:** [24. August 2018 um 20:14 UTC](https://forum.shopware.com/t/class-pdo-in-einer-components-datei/54804/1 "2018-08-24T20:14:05Z")

</div>

Hallo zusammen,

ich möchte folgenden Code:

```
$statement->fetchAll(PDO::FETCH_COLUMN);

```

in einer Datei im Ordner Compontents eines Plugins (ab V5.3) ausführen.

Es kommt aber folgender Fehler:

```
Fatal error: Uncaught Error: Class 'xyz\Components\PDO' not found in /xyz/Components/xyz.php

```

Hat jemand einen Tipp, wie dies dort ausgeführt werden kann?

Danke vorab und Grüße,  
Frank

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [24. August 2018 um 20:44 UTC](https://forum.shopware.com/t/class-pdo-in-einer-components-datei/54804/2 "2018-08-24T20:44:13Z")

</div>

Einfach aus&nbsp;

$statement-\>fetchAll(PDO::FETCH\_COLUMN);

zu

$statement-\>fetchAll(\PDO::FETCH\_COLUMN);
