If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: timestamp-ing

  1. #1
    Junior Member cinq's Avatar
    Join Date
    Jun 2003
    Member #
    Let's say I have created a table in my database to house the following fields:

    name - text
    employeeno - int
    entrydate - timestamp

    When creating a php form to add employees to the database, the timestamp would auto create the entrydate to be the current time as per where ? In GMT ? or my computer time ?

    Also can i then sort details of my employees according to the field entrydate ?

    Say :
    SELECT * from employee_records ORDER BY entrydate DESC

    Would that return me the employee details according to their entrydates from most recent to oldest ?

    Pls advice, many thanks in advance


  3. #2
    Junior Member vornn's Avatar
    Join Date
    Jul 2003
    Member #
    It's usually the server time.

    The easiest way it to not put data into your database for the date, but allow the database to enter the current time/date in the database for you.

    Have a look at the data base info for auto entry data.

    have a look at

    this. It should help.

    Sorting isn't a problem, here's a sample:

    $results= "SELECT * FROM emplyees ORDER BY date DESC";

    That should get you the results you want.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 11:09 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: