Lid |
|
Dit moet het doen, je moet er ORDER BY aan toevoegen, sorteren op datum en dan DESC (zeg maar van Z-A):
<?
INCLUDE("../connect.php");
$sql = "SELECT * FROM foto ORDER BY datum DESC LIMIT 0,1";
$result = mysql_query($sql) or die(mysql_error());
while($rij=mysql_fetch_array($result))
{
?>
<TABLE WIDTH="205 PX" BORDER="0" BORDERPROPERTIES="0" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD WIDTH="205 PX">
<IMG SRC="<?ECHO $rij['foto'];?>" WIDTH="205 PX" ALT="<?ECHO $rij['titel'];?>">
<BR>
<FONT COLOR="#000000" SIZE="2" FACE="TAHOMA">
<I><?ECHO $rij['titel'];?></I>
</FONT>
</TD>
</TR>
</TABLE>
<?
}
?>
<? INCLUDE("../connect.php"); $sql = "SELECT * FROM foto ORDER BY datum DESC LIMIT 0,1"; { ?> <TABLE WIDTH="205 PX" BORDER="0" BORDERPROPERTIES="0" CELLPADDING="0" CELLSPACING="0"> <TR> <TD WIDTH="205 PX"> <IMG SRC=" <? ECHO $rij['foto'];? >" WIDTH="205 PX" ALT=" <? ECHO $rij['titel'];? >"> <BR> <FONT COLOR="#000000" SIZE="2" FACE="TAHOMA"> <I> <? ECHO $rij['titel'];? ></I> </FONT> </TD> </TR> </TABLE> <? } ?>
|