0

Please I really need help for this. It's is very important for my project Please help. I am so stuck on this.

I have a table "employees" in MySQL database inside which I have 'payday' for employees salary day as date in field in 'employees' table.

Let's say:

payday is Nov 28 2015 for some employees Nov 25 2015 for some others

What I can't rap my head around is how to :

 $this->db
 ->select('*')
 ->from(employees)
 ->where (Curdate() = 'payday');
 ->get()
 count_all_result();
 Return true;

While this works for the first month , how then can I repeat this every 28th, 25th of every month loop through the years......

I am using framework, Codeigniter

  • Alert who, how? What is your data structure? What have you tried so far? – Shadow Nov 14 '15 at 21:15
  • Who = user, how = notifications count in dashboard, data structure = Code igniter model API, what I have tried date_diff(curdate(), pay_day) I don't know how to count it "every 30 days" – Babatunde Misbah Nov 14 '15 at 21:33

1 Answers1

0

I think the method that you are looking for is crone job (scheduled task), you can find sufficient information at below links:

How to set cron job url for codeigniter?

How to create cron job using PHP?

Community
  • 1
  • 1
Amin.Che
  • 501
  • 5
  • 13