Code: Alles auswählen
$thread_query_string = "SELECT DISTINCT(topid), id, forid, subfor, topid, user, posttime, text, num_edit, date_format(editdate, '%d.%m.%y - %H:%i') AS form_editdate, date_format(posttime, '%d.%m.%y - %H:%i') AS form_posttime FROM ".$praefix."threads WHERE topid='";
$thread_query_string .= implode("' OR topid='", $thread_query_array);
$thread_query_string .= "' ORDER BY posttime DESC LIMIT 0, 10";
$thread_query_string ist eine Array wo alle topids drin sind also insgesammt 10 stück.
Beispiel:
Array ( [0] => 605 [1] => 1297 [2] => 1402 [3] => 58 [4] => 1357 [5] => 1379 [6] => 1257 [7] => 1302 [8] => 1288 [9] => 1385 )
Bekomme das mit DISTINCT einfach nicht hin habe schon alle mögliche Varianten probiert. mit Klammer ohne mit Komma ohne nix geht.
Kennt jemand noch ne bessere Lösung ?