new commer to php field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itfgnanvigneshwari
    New Member
    • Sep 2006
    • 2

    new commer to php field

    i want to retrieve record from database named student using the date field. i have to retrieve records between the specified date like from 1/1/2006 to 10/3/2006. i am an fresher of php so can you provide me with detailed coding.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    do you mean table named student? i will assume so.

    SELECT * FROM Student WHERE data>'2006-1-1' AND date < 2006-10-3

    There are lots of date and time functions available in MySQL see

    Comment

    • phpmaet
      New Member
      • Sep 2006
      • 27

      #3
      Hi,
      you can use the following code. It's very useful for you.


      [PHP]

      $quy="SELECT * FROM `dt_tb` WHERE dt BETWEEN '2006-01-01' AND '2006-10-3'";
      $quyres=mysql_q uery($quy);
      [/PHP]


      Thanks

      Comment

      Working...