I have a database that stores documents relating to meetings. They have all the 
usual stuff agenda, minutes etc. There are 3 paper types for each date agenda 
(1 only), minutes (1 only), and a bunch of general documents titled 'papers'.

I need to display all the documents for a specific date which is easy but I 
also need to retrieve the minutes for the PREVIOUS meeting which is proving 
more difficult. The documents are stored by date in the format dd/mm/yy. If 
someone wants the documents from 02/05/06 how do I find the minutes for the 
previous date when I do not know when it is?

 Can I do this with mysql? Or will it be better with mktime and some php?



-- 
-- Table structure for table `board_papers`
-- 

CREATE TABLE `board_papers` (
  `id` int(4) NOT NULL auto_increment,
  `doc_date` varchar(10) NOT NULL default '0000-00-00',
  `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda',
  `fileName` varchar(50) NOT NULL default '',
  `fileSize` int(4) NOT NULL default '0',
  `fileType` varchar(50) NOT NULL default '',
  `content` blob NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

Reply via email to