Results 1 to 14 of 14

Thread: problem displaying records in order of time and date in php

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    problem displaying records in order of time and date in php

    Hi all.I use $Timestamp=date("g:i A l, F j Y."); to collect time and date the visitors entered my site . It inserts the data in to mysql database in this format :



    3:02 AM Monday, July 24 2006





    Code:
    mysql_query("INSERT INTO logdisplay VALUES('$ID','$column1','$Timestamp','$column2','$columns3')");
    
     
    
     
    
    $affected_rows = $sql->a_rows;




    But when i query the database and use order by ,the data does not get displaied in order of newest on the top!!



    Code:
    select * from logdisplay order by Timestamp




    could any one help me so that i get newst log records on the top .In another how to query my table baced on time an data.Thanks
    Last edited by tony007; Jul 25th, 2006 at 03:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width