I am generating reference no REF-082013-001 (REF-mmyyyy-001) and incrementing the last part for every entry. REF-082013-001 for first record and REF-082013-002 for second and so on.
My Question is How can i reset the last number by php for every new month. Let say September 2013 I want it to be REF-09-2013-001 and auto increment it till the end of September and then in November reset it again.
Is there a ways to do this in php. Your help is much appreciated. Thank you
Update
Currently 'REF-'.date('m-Y').$maxnumberfromdb in single column called reference_no and Now thinking to store the mm-yyyy ref1 and last number in ref2 separately and start ref2 every first day of the month.