Jump to content


Photo

order by date..


  • Please log in to reply
5 replies to this topic

#1 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 06 May 2006 - 01:45 AM

shouldn't this display pictures by date

<?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>';
}
          ?>


#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 06 May 2006 - 02:07 AM

<?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>';
}
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 06 May 2006 - 02:22 AM

mm ok makin that in to a variable how is that going to help?

#4 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 06 May 2006 - 02:36 AM

also i notice that if i keep it like that everytime i upload a pic is going to display it..

all i want to do is display a single picture.. the last one uploaded..

#5 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 06 May 2006 - 02:55 AM

alright all had to do was limit 1 but still i can't get the last pic uploaded to show up..

#6 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 06 May 2006 - 03:33 AM

ahh forget the time date all i had to do was add ASC to make the last row appear.. come on ppl i keep answering my self :|




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users