Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
$sql = "SELECT beitrag FROM tabelle ORDER BY beitrag DESC LIMIT = '5'";
$source = mysql_query($sql);
while ($result = mysql_fetch_array($source)) {
$beitrag[] = $result['beitrag'];
}
shuffle($beitrag);
foreach ($beitrag as $i) {
echo $i;
}
Vielleicht das dann in eine Unterabfrage packen und dann bissl rumprobieren? Oder es auf der programm-seite entsprechend so erstellen, dass nur der 1. Eintrag angezeigt wird.
$sql = "SELECT * FROM tabelle ORDER BY id DESC LIMIT = '5'";
$source = mysql_query($sql);
while ($result = mysql_fetch_array($source)) {
$id[] = $result['id'];
$beitrag[] = $result['beitrag'];
$time[] = $result['time'];
}
$rand = rand(0, 4);
echo $id[$rand];
echo $beitrag[$rand];
echo $time[$rand];