0

my table like........

 id  Sname  attendence    ADate  
  1   xyz        p          01/01/2013  mm/dd/yyyy
  2   zxc        A          01/01/2013
  3   asd        p          01/01/2013

Now if month changes then these rows auto-insert on page load event like

 id  Sname  attendence      ADate  
  1   xyz        p          01/01/2013   mm/dd/yyyy
  2   zxc        A          01/01/2013
  3   asd        p          01/01/2013
  1   xyz        p          02/01/2013
  2   zxc        A          02/01/2013   mm/dd/yyyy
  3   asd        p          02/01/2013

Previously I used only month 1, 2, 3,4 for this but problem with this is while it comes to 12 I have to insert 1 so it will affect old row. Please tell me what to do

  • Welcome to StackOverflow: if you post code, XML or data samples, **please** highlight those lines in the text editor and click on the "code samples" button ( `{ }` ) on the editor toolbar to nicely format and syntax highlight it! – marc_s Jan 03 '13 at 06:02

1 Answers1

0

Use cron jobs

For this you can create a page which runs automatically on first date of month.

Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106