Hi small-step,
tabelle1
| id | reporter_id | inhalt |
|---------------------------|
| 1 | 12 | test1 |
| 2 | 12 | test2 |
| 3 | 7 | test3 |tabelle2
| id | reporter_id | active | inhalt |
|------------------------------------|
| 1 | 12 | 1 | test1 |
| 2 | 12 | 0 | test2 |
| 3 | 7 | 0 | test3 |
$ID sei 12
SELECT
COUNT(*)
FROM tabelle1 AS t1
INNER JOIN tabelle2 AS t2
ON t1.reporter_id = t2.reporter_id
WHERE t2.active = '1' AND t1.reporter_id = {$ID}
sollte 3 liefern.
idt active ein char-Feld? Ansonsten t2.active=1
Kann leider nicht testen. Gehts ?
ciao
romy
--
DIE ROMY AUS L. AN DER P. SAGT DANKE UND AUF WIEDERSEHEN
http://www.peter.in-berlin.de/projekte/selfcode/?code=sh%3A(+fo%3A)+rl%3A(+br%3A>+ch%3A~+n4%3A%26+ie%3A%25+mo%3A)+va%3A|+de%3A<+zu%3A|+fl%3A(+ss%3A)+ls%3A[
DIE ROMY AUS L. AN DER P. SAGT DANKE UND AUF WIEDERSEHEN
http://www.peter.in-berlin.de/projekte/selfcode/?code=sh%3A(+fo%3A)+rl%3A(+br%3A>+ch%3A~+n4%3A%26+ie%3A%25+mo%3A)+va%3A|+de%3A<+zu%3A|+fl%3A(+ss%3A)+ls%3A[