im using unix timestamps because i have several functions for them and i need to track date and time, i use 1 database field for both and run it through a function to get them seperately
the problems im having is i need to find only the appointments for the current date in 1 query, then in the next on only the ones in the future, and then the past ones. im also needing to organize them so the one that occurs the soonest will be at the top of the list
heres my database export:
CREATE TABLE `appts` ( `appts_id` mediumint(8) NOT NULL auto_increment, `appts_user_id` mediumint(8) NOT NULL default '0', `appts_status` smallint(1) NOT NULL default '0', `appts_name` varchar(250) NOT NULL default '', `appts_date` int(11) NOT NULL default '0', `appts_where` varchar(100) NOT NULL default '', `appts_phone` varchar(15) NOT NULL default '', `appts_about` varchar(250) NOT NULL default '', PRIMARY KEY (`appts_id`) ) TYPE=MyISAM AUTO_INCREMENT=3; -- -- Dumping data for table `appts` -- INSERT INTO `appts` VALUES (1, 1, 1, 'Dean Cook', 1137864600, 'high school', '979-979-9797', 'some appt');
this project can still handle a database change, so if i need to change to something else i can, i just need to make sure i have date, time and is organized like i explained.
if anyone could help id greatly appreciate it