Good Archive Calendar - need HELP

Discussion in 'PHP' started by KingCobra, Apr 7, 2009.

  1. #1
    How can I make a archive calender like this image from the following sql datas?

    [​IMG]

    Sample sql data:

    CREATE TABLE IF NOT EXISTS `news` (
    `news_id` int(6) NOT NULL,
    `cat_id` tinyint(2) NOT NULL DEFAULT '1',
    `date` date NOT NULL,
    `title` varchar(100) NOT NULL,
    `details` varchar(5000) NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;


    INSERT INTO `news` (`news_id`, `cat_id`, `date`, `title`, `details`) VALUES
    (1, 1, '2008-04-13', 'my title here 01', 'my details here 02'),
    (2, 1, '2008-04-07', 'news title', 'news details'),
    (3, 1, '2007-04-25', 'title here', 'details here'),
    (4, 1, '2007-07-20', 'something here', 'some details'),
    (5, 1, '2009-04-07', 'world helth day 01', 'details world helth day 01'),
    (6, 1, '2009-04-07', 'world helth day 02', 'details world helth day 02');




    what will be the sql query and display script?

    I think its a good stuff and helpfull for all php developer.
     
    KingCobra, Apr 7, 2009 IP
  2. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    Please help me
     
    KingCobra, May 5, 2009 IP
  3. GreenWithEnvy

    GreenWithEnvy Active Member

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    You'll want to find an HTML code for making it easier. Your MySQL query will be something like "SELECT `news_id`, `cat_id`, `data`, `title`, `details` FROM `news` ORDER BY `date` DESC;" You then loop through it and output it in HTML... do you know muhc PHP?
     
    GreenWithEnvy, May 5, 2009 IP
  4. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    KingCobra, May 5, 2009 IP