hiho leute, nettes forum habt ihr hier 
ich hab ein problem mit folgender abfrage:
ihr seht vermutlich, was ich bezwecken will....
das ist für ein selbstgecodetes forum, das folgende tabelle hat:
thread | parent | thema | autor | email | reply | datum | text
ich will also, dass sql nur jeweils die threadnummer von der neusten antwort ausspuckt also der höchste parent der threadnummer
leider geht das mit der sql-abfrage nicht, weil sql meckert
könnt ihr mir helfen?
wenn ihrs nicht versteht, dann postet bitte, dass ihrs nicht versteht

ich hab ein problem mit folgender abfrage:
PHP-Code:
SELECT thread,parent,autor,datum FROM forum GROUP by thread having parent=max(parent) ORDER by datum DESC LIMIT 0,50
das ist für ein selbstgecodetes forum, das folgende tabelle hat:
thread | parent | thema | autor | email | reply | datum | text
ich will also, dass sql nur jeweils die threadnummer von der neusten antwort ausspuckt also der höchste parent der threadnummer

leider geht das mit der sql-abfrage nicht, weil sql meckert

könnt ihr mir helfen?
wenn ihrs nicht versteht, dann postet bitte, dass ihrs nicht versteht

Kommentar