1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

select posts depending on month

Discussion in 'Databases' started by piniyini, Oct 2, 2005.

  1. #1
    I wanna make an archives section for my site, is there any way to select posts depending on the month. The posts have a date/time field in the db.

    I think its gonna be something like this
    SEMrush
    select * from `table` where `date_time` = january

    or some crap like that?
     
    piniyini, Oct 2, 2005 IP
    SEMrush
  2. discoverclips

    discoverclips Peon

    Messages:
    491
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yeah seems good. something like SELECT content FROM table WHERE 'date'=january;
     
    discoverclips, Oct 2, 2005 IP
  3. piniyini

    piniyini Well-Known Member

    Messages:
    511
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #3
    yeh but date/time is in the format of 2005-09-28 09:53:06 - how do i select posts depending on the month?
     
    piniyini, Oct 2, 2005 IP
  4. piniyini

    piniyini Well-Known Member

    Messages:
    511
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #4
    its ok guys i got it ;-)
     
    piniyini, Oct 2, 2005 IP