SELECT *
FROM upcomingwars
ORDER BY upcomingwars.datum, upcomingwars.tijd_uur DESC, upcomingwars.tijd_minuut
zoals je ziet sorteert hij deze op de datum daarna op de tijd in uren en daarna in minuten.
Nu wil ik dat hij de 8ste datum pakt uit de tabel upcomingwars hoe doe ik dat?
het is namelijk voor website de eerste 7 waardes uit de tabel krijgen een andere class mee dan de 8ste waarde uit een tabel
de hele code:
<?php $counter = 0; // initialize counter outside loop ?>
<?php do { ?>
<?php
// VLAGGEN
if ($row_getUpcomingwars['land'] == "nl"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-nl.gif\" width=\"16\" height=\"11\" alt=\"flag-nl\" />";
}
if ($row_getUpcomingwars['land'] == "be"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-be.gif\" width=\"16\" height=\"11\" alt=\"flag-be\" />";
}
if ($row_getUpcomingwars['land'] == "de"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-de.gif\" width=\"16\" height=\"11\" alt=\"flag-de\" />";
}
if ($row_getUpcomingwars['land'] == "fi"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-fi.gif\" width=\"16\" height=\"11\" alt=\"flag-fi\" />";
}
if ($row_getUpcomingwars['land'] == "se"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-se.gif\" width=\"16\" height=\"11\" alt=\"flag-fi\" />";
}
if ($row_getUpcomingwars['land'] == "pl"){
$row_getUpcomingwars['land'] = "<img src=\"images/flags/flag-pl.gif\" width=\"16\" height=\"11\" alt=\"flag-pl\" />";
}
// EIND VLAGGEN
// GAME ICONS
if ($row_getUpcomingwars['game'] == 1){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-cs.gif\" width=\"16\" height=\"11\" alt=\"icon-cs\" />";
}
if ($row_getUpcomingwars['game'] == 2){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-css.gif\" width=\"16\" height=\"11\" alt=\"icon-css\" />";
}
if ($row_getUpcomingwars['game'] == 3){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-to.gif\" width=\"16\" height=\"11\" alt=\"icon-to\" />";
}
if ($row_getUpcomingwars['game'] == 4){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-toc.gif\" width=\"16\" height=\"11\" alt=\"icon-toc\" />";
}
if ($row_getUpcomingwars['game'] == 5){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-ut.gif\" width=\"16\" height=\"11\" alt=\"icon-ut\" />";
}
if ($row_getUpcomingwars['game'] == 6){
$row_getUpcomingwars['game'] = "<img src=\"images/games/icon-ut2k4.gif\" width=\"16\" height=\"11\" alt=\"icon-ut2k4\" />";
}
// EIND GAME ICONS
?>
<tr height="18" <?php if ($counter++ %2) { echo 'class="warlicht"'; } ?> >
<td width="20" align="center" valign="middle" class="icon"><?php echo $row_getUpcomingwars['game']; ?></td>
<td width="26" align="center" valign="middle" class="country"><?php echo $row_getUpcomingwars['land']; ?></td>
<td width="125" align="left" valign="middle" class="clan"><?php echo $row_getUpcomingwars['clan']; ?></td>
<td width="38" align="center" valign="middle" class="upcomming"><?php echo $row_getUpcomingwars['score']; ?></td>
</tr>
<?php } while ($row_getUpcomingwars = mysql_fetch_assoc($getUpcomingwars)); ?>
<tr height="17" class="lastwarlicht">
<?php do {
// VLAGGEN
if ($row_getRow8Upcomingwars['land'] == "nl"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-nl.gif\" width=\"16\" height=\"11\" alt=\"flag-nl\" />";
}
if ($row_getRow8Upcomingwars['land'] == "be"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-be.gif\" width=\"16\" height=\"11\" alt=\"flag-be\" />";
}
if ($row_getRow8Upcomingwars['land'] == "de"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-de.gif\" width=\"16\" height=\"11\" alt=\"flag-de\" />";
}
if ($row_getRow8Upcomingwars['land'] == "fi"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-fi.gif\" width=\"16\" height=\"11\" alt=\"flag-fi\" />";
}
if ($row_getRow8Upcomingwars['land'] == "se"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-se.gif\" width=\"16\" height=\"11\" alt=\"flag-fi\" />";
}
if ($row_getRow8Upcomingwars['land'] == "pl"){
$row_getRow8Upcomingwars['land'] = "<img src=\"images/flags/flag-pl.gif\" width=\"16\" height=\"11\" alt=\"flag-pl\" />";
}
// EIND VLAGGEN
// GAME ICONS
if ($row_getRow8Upcomingwars['game'] == 1){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-cs.gif\" width=\"16\" height=\"11\" alt=\"icon-cs\" />";
}
if ($row_getRow8Upcomingwars['game'] == 2){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-css.gif\" width=\"16\" height=\"11\" alt=\"icon-css\" />";
}
if ($row_getRow8Upcomingwars['game'] == 3){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-to.gif\" width=\"16\" height=\"11\" alt=\"icon-to\" />";
}
if ($row_getRow8Upcomingwars['game'] == 4){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-toc.gif\" width=\"16\" height=\"11\" alt=\"icon-toc\" />";
}
if ($row_getRow8Upcomingwars['game'] == 5){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-ut.gif\" width=\"16\" height=\"11\" alt=\"icon-ut\" />";
}
if ($row_getRow8Upcomingwars['game'] == 6){
$row_getRow8Upcomingwars['game'] = "<img src=\"images/games/icon-ut2k4.gif\" width=\"16\" height=\"11\" alt=\"icon-ut2k4\" />";
}
// EIND GAME ICONS
?>
<td width="20" align="center" valign="middle" class="lasticon"><?php echo $row_getRow8Upcomingwars['game']; ?></td>
<td width="26" align="center" valign="middle" class="lastcountry"><?php echo $row_getRow8Upcomingwars['land']; ?></td>
<td width="125" align="left" valign="middle" class="lastclan"><?php echo $row_getRow8Upcomingwars['clan']; ?></td>
<td width="38" align="center" valign="middle" class="lastupcomming"><?php echo $row_getRow8Upcomingwars['score']; ?> </td>
<?php } while ($row_getRow8Upcomingwars = mysql_fetch_assoc($getRow8Upcomingwars)); ?></tr>
</table>