---
title: "exec_SELECTquery - Problem"
url: "https://www.typo3.net/d/100114-exec-selectquery-problem"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Datenbank","Frage","PHP"]
created: "2010-07-20"
last_reply: "2010-07-20"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# exec_SELECTquery - Problem

Extensions › Entwicklung · 2 Antworten · gestartet 2010-07-20

## Eröffnungsbeitrag

**FrankT** · 2010-07-20 · [Beitrag #1](https://www.typo3.net/d/100114-exec-selectquery-problem/1)

Hallo,

ich habe ein Problem mit der Select-Abfrage.

```php
$textDB = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
  'tx_thtextpdf_category.mail_recipient AS mail,
   tx_thtextpdf_catalog.art_nr AS art_nr',
  'tx_thtextpdf_category , tx_thtextpdf_catalog',
  'tx_thtextpdf_category.uid = tx_thtextpdf_catalog.category_id AND tx_thtextpdf_catalog.uid IN (3,4,5) ',
  'mail',
  '',
  ''
);
debug(mysql_num_rows($textDB));
```

Die Datensätze 3,4,5 existieren, aber die Abfrage liefert nur einen Datensatz (debug-Ausgabe).

Kann T3 so kein 'WHERE xyz IN (3,4,5)'?

PHPMYADMIN gibt mir mit der Abfrage drei Datensätze aus:
SELECT tx_thtextpdf_category.mail_recipient AS mail, tx_thtextpdf_catalog.art_nr AS art_nr
FROM tx_thtextpdf_category, tx_thtextpdf_catalog
WHERE tx_thtextpdf_category.uid = tx_thtextpdf_catalog.category_id
AND tx_thtextpdf_catalog.uid
IN ( 3, 4, 5 )

## Antworten

### [#2](https://www.typo3.net/d/100114-exec-selectquery-problem/2) · Norman2k · 2010-07-20

Du hast in deinem SELECT ein "GROUP BY mail" was du in deiner Abfrage in phpMyAdmin nicht hast.

### [#3](https://www.typo3.net/d/100114-exec-selectquery-problem/3) · FrankT · 2010-07-20

Vielen Dank für die schnelle Hilfe - jetzt geht es.

ich habe tatsächlich 'mail' bei GROUP BY und nicht bei ORDER BY eingesetzt.

Das war einfach eigene Blödheit - Danke nochmal.

Gruß
Döini

---

Quelle: „exec_SELECTquery - Problem“, typo3.net, https://www.typo3.net/d/100114-exec-selectquery-problem
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
