Martin2004: Comments

Beitrag lesen

Hallo und guten Abend,

hmm hab da mal eine Frage. Warum werden denn die Comments nicht gezählt. Weiß jemand was ich da flasch gemacht habe?

Hier mal der Code:

<?php
$count= mysql_fetch_assoc(mysql_query('SELECT count(id) AS anzahl FROM Komments WHERE parent_id = "'.$data['id'].'"'));
?>

So lass ich das dann auslesen:

<a href="javascript:popup('parent_id=<?=$_data['id']?>')"> ab zu den comments ( <?=$count['anzahl']?> ) </a></p>

Gruß Martin