itzumar
Posts: 88
|
Posted: 03/11/2014, 2:29 AM |
|
Dear All!
i am in big problem plz help me. I am going to generate leave record of employee in code charge studio using php and mysql. but I am facing one problem which is:
"Employee can get 2 leave after one month of joinng date"
"Employee can get 4 leave after two month of joinng date"
"Employee can get 6 leave after three month of joinng date"
and so on
please guide me how can i do that in mysql and php. any code or example???????????????
_________________
Umar |
|
|
eratech
Posts: 513
|
Posted: 03/11/2014, 9:15 PM |
|
Is it simply Leave = 2*months since joining date?
If that's it, I would suggest you look at MySQL to work out the number of months DATEDIFF() from joining date until the CURRENT_DATE , and multiply by 2. You can CONCATenate the text together to give you the label text.
You will learn a lot more finding the answer yourself instead of asking for code examples.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
|