Php mysql

Results 1 to 7 of 7
  1. #1
    Elite Member gamerzbm is offline
    Member +Rank
    Feb 2008 Join Date
    199Posts

    Php mysql

    Hey guys whats the best way to store Time and date into mysql im trying to store time and date for my bidding system so i can calculate time left on an item so does anyone know


  2. #2
    (oO (||||) (||||) Oo) jM2.me is offline
    Grand MasterRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: Php mysql


  3. #3
    Elite Member gamerzbm is offline
    Member +Rank
    Feb 2008 Join Date
    199Posts

    Re: Php mysql

    thanks what about the MYSQL column ? do i use timestamp datetime int(11) would u know i already have the table but the should the column bee

  4. #4
    (oO (||||) (||||) Oo) jM2.me is offline
    Grand MasterRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: Php mysql

    In MySQL I always do following: 'timestamp' varchar(64)

  5. #5
    Moooooooooooooooo alphaest is offline
    Grand MasterRank
    Jul 2006 Join Date
    WorldLocation
    2,026Posts

    Re: Php mysql

    Quote Originally Posted by ProKiller002 View Post
    In MySQL I always do following: 'timestamp' varchar(64)
    varchar for a time stamp? sounds like too loose restrictions for me

    Im usually using int, it isnt the best to see the dates from phpMyAdmin but its the easiest to work with in php

  6. #6
    Elite Member gamerzbm is offline
    Member +Rank
    Feb 2008 Join Date
    199Posts

    Re: Php mysql

    so ALTER TABLE `mytabe` ADD `time` int(11)NOT NULL ;

    ??? thats how?
    Last edited by gamerzbm; 25-09-09 at 06:19 PM.

  7. #7
    (oO (||||) (||||) Oo) jM2.me is offline
    Grand MasterRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: Php mysql

    Quote Originally Posted by alphaest View Post
    varchar for a time stamp? sounds like too loose restrictions for me
    oups. i was meant to write int(11) but dono why i wrote varchar(64)
    poor me



Advertisement