PHP beginner |
|
Ik heb een klein probleempje met mijn forum
ik heb de volgende statussen
0 = Normale Topic
1 = Gesloten
2 = Sticky
mijn Query
$sql = "SELECT topic_id, topic_titel, topic_cat, topic_datumtijd,status,gebruiker_id FROM topic
WHERE topic_cat = '".mysql_real_escape_string($_GET['cate'])."' ORDER BY status DESC,topic_datumtijd DESC";
$resultaat = mysql_query($sql)or die(mysql_error());
$sql = "SELECT topic_id, topic_titel, topic_cat, topic_datumtijd,status,gebruiker_id FROM topic
Ik ORDER met status nu maar de gesloten topic's hebben een hogere status dan de normale topic's dus als ik een nieuw topic open blijven de gesloten topics boven aan staan.
Weet iemand ik het op kan lossen ?
|