dselp3944 2015-11-14 20:57
浏览 32

Codeigniter PHP MYSQL - 选择每月date = pay_day

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

  • 写回答

1条回答 默认 最新

  • dongwei5740 2015-11-14 21:52
    关注

    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?

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大