[mehrere auswahlmöglichkeiten]MySQL WHERE id = 1,2,3,4?
Verfasst: 30.12.2012 03:03
Hallo Leute,
kurze frage, ich habe das bisher so:
Da muss es doch eine leichtere möglichkeit geben, kann ich nicht irgendwie so machen:
kurze frage, ich habe das bisher so:
Code: Alles auswählen
mysql_query("SELECT topic_id, topic_title FROM phpbb3_topics WHERE forum_id = 4 OR forum_id = 5 OR forum_id = 6 OR forum_id = 7 OR forum_id = 8 ORDER BY topic_time DESC LIMIT 5");
Code: Alles auswählen
mysql_query("SELECT topic_id, topic_title FROM phpbb3_topics WHERE forum_id = {4, 5, 6, 7, 8, 9} ORDER BY topic_time DESC LIMIT 5");