Jump to content

order by date..


corillo181

Recommended Posts

shouldn't this display pictures by date

[code]
<?php
          $query=mysql_query("SELECT * FROM pictures ORDER BY datetime") or die(mysql_error());           $result = mysql_num_rows($query);
          while($pic=mysql_fetch_array($result)){
          echo '<a href=clubsparty/pictures.php'.$pic['name'].'>'.'<img border=0 height=150 width=110 src="clubsparty/3-11-06/'.$pic['name'].'"></a>';
}
          ?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/9166-order-by-date/
Share on other sites

<?php

$query=mysql_query"SELECT * FROM pictures limit 1" or die("mysql errow");
$result = mysql_num_rows($query);
while($pic=mysql_fetch_array($result)){
echo '<a href=clubsparty/pictures.php'.$pic['name'].'>'.'<img border=0 height=150 width=110 src="clubsparty/3-11-06/'.$pic['name'].'"></a>';
}
?>
Link to comment
https://forums.phpfreaks.com/topic/9166-order-by-date/#findComment-33772
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.