Code: Alles auswählen
$result_words = mysql_query("SELECT word_id FROM phpbb_search_wordlist WHERE word_text LIKE '%$begriff%'");
$ergebnisse = array();
while($row = mysql_fetch_array($result_words)){
$result_match = mysql_query("SELECT post_id FROM phpbb_search_wordmatch WHERE word_id = {$row['word_id']}");
$row_2 = mysql_fetch_array($result_match);
$result_topics = mysql_query("SELECT topic_id, topic_title, topic_time FROM phpbb_topics WHERE forum_id = 20 AND topic_first_post_id = {$row_2['post_id']}");
if($row_3 = mysql_fetch_array($result_topics) AND $row_3['topic_id'] != $topic_id){
array_push($ergebnisse, array($row_3['topic_id'], $row_3['topic_title'], $row_3['topic_time']));
}
$topic_id = $row_3['topic_id'];
}