Storing Date in mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

	I need to store the date of record / entry in the mysql database, so I have the following table create statement:

CREATE TABLE `token_table` (
  `token_id` int(11) NOT NULL auto_increment,
  `token_utuser_id` int(11) NOT NULL default '0',
  `token_name` varchar(100) NOT NULL default '',
  `token_date` varchar(100) NOT NULL default '',
  `token_user_id` varchar(100) default '',
  `token_ticket_id` varchar(100) default '',
  `token_data` varchar(100) default '',
  PRIMARY KEY  (`token_id`),
  KEY `tokencheck` (`token_utuser_id`,`token_name`)
) TYPE=MyISAM; 

So in the token_date field I am storing the date in the following format from PHP:

date("d/m/Y") which creates the following entry "05/07/2004" (example).

I would like to know fro the list is ... is this the best way to store the date ? Would this be easy to select against ?

Michael.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux