Hallo
Ich hab da so ein kleines Problem!
Ich will einen kleinen Tourplaner machen also tour_von tour_bis und tour_city
eingetragen bekomme ich es ohne Problem !
tour_von ist date und tour_bis ist date! im mysql admin!
Wenn ich jetzt meine Sachen ausgeben möchte und zwar so das das jüngste datum zuerst erscheint kommt bei mir alles durcheinander da er ja das datum nur nach den ersten 2 stellen sortiert und nicht das komplette hier mal mein Code der Ausgabe vielleicht hilft mir einer auf die Sprünge !
vielleicht kann mir ja jemand helfen und auch gleich noch nen tip geben wie ich es noch realisiere das nur termine in der zukunft angezeigt werden ! DANKE
lg rene
Ich hab da so ein kleines Problem!
Ich will einen kleinen Tourplaner machen also tour_von tour_bis und tour_city
eingetragen bekomme ich es ohne Problem !
tour_von ist date und tour_bis ist date! im mysql admin!
Wenn ich jetzt meine Sachen ausgeben möchte und zwar so das das jüngste datum zuerst erscheint kommt bei mir alles durcheinander da er ja das datum nur nach den ersten 2 stellen sortiert und nicht das komplette hier mal mein Code der Ausgabe vielleicht hilft mir einer auf die Sprünge !
PHP-Code:
<?php
$linkcat = "SELECT DATE_FORMAT (tour_von, '%d.%M.%Y') AS tour_von , DATE_FORMAT (tour_bis, '%d.%M.%Y') AS tour_bis, tour_city, tour_street FROM tour ORDER by tour_von ASC ";
$catget = mysql_query($linkcat,$link)or die (mysql_error());
$row_catget = mysql_fetch_assoc ($catget);
$totalRows_catget = mysql_num_rows($catget);
?>
<?php
do {
?>
</p>
<div class="tour">
<li style="text-align: center">
<span style="color: #FF0004; font-weight: bold; font-family: verdana;">von</span> <?php echo $row_catget['tour_von'] ?> <span style="color: #FF0004; font-weight: bold; font-family: verdana;">bis</span> <?php echo $row_catget['tour_bis'] ?> <span style="color: #FF0004; font-weight: bold; font-family: verdana;">in</span> <?php echo $row_catget['tour_city'] ?><span style="color: #FF0004; font-weight: bold; font-family: verdana;"> ,</span> <?php echo $row_catget['tour_street'] ?>
</li>
</div>
<p>
<?php
} while ($row_catget = mysql_fetch_assoc($catget));
$rows = mysql_num_rows($catget);
if($rows> 0) {
mysql_data_seek($catget, 0);
$row_catget = mysql_fetch_assoc($catget);
}
?>
lg rene
Kommentar