suresh

suresh

  • NA
  • 293
  • 0

How to count number of records

Feb 22 2012 8:27 PM
HI,

I have table student

st_id , st_name, act_date

1          james      2/2/2012

2          albert      2/4/2012

3          johnson   30/1/2012

4         hitler        2/2/2012



you can see the first record the act_date is  2nd Feb 2012.

Addign one month to Every record.

Ex:

Today date is 23rd Feb 2012, see the first record 2nd Feb 2012.

2nd Feb 2012+adding One Month=> 3rd March 2012.

When i logined into my web site (23rd Feb 2012) , it has to show the count Zero.

When i logined into my web site (3rd March 2012), it has to show the count=2 i.e the 1st record and 4th record.

Same process wlll have to follw to other records.

How to write a Query to count that records based on that condition adding after one month to the record.

Thanks,




Answers (2)