Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: php and mysql less than date  (Read 2790 times)

0 Members and 1 Guest are viewing this topic.

marjune

    Topic Starter


    Rookie

    php and mysql less than date
    « on: October 04, 2009, 08:38:54 PM »
    i really need this problem solve asap, how can i select  all dates from the data base less than or equal the given date FOR EXAMPLE THE GIVEN DATE IS SEP 22 2009 THEN,

    FROM JAN 1 2009 UP TO SEP 22 2009 WOULD BE THE RESULT.

    THANKZZZZZZZZ

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: php and mysql less than date
    « Reply #1 on: October 05, 2009, 12:17:30 AM »
    Here is one possible solution:

    Code: [Select]
    SELECT *
    FROM Store_Information
    WHERE Date BETWEEN 'Jan-01-2008' AND 'Oct-04-2009'

    If you had a table called Store_Information.
    Is that what you want?

    marjune

      Topic Starter


      Rookie

      Re: php and mysql less than date
      « Reply #2 on: October 05, 2009, 12:27:23 AM »
      thank you for your time but i got it in other way