how to compare only date and year in php codeigniter

后端 未结 3 945
闹比i
闹比i 2021-01-06 13:40

My model

public function get_payscale() {
    $this->db->from(\'payscale P\')->join(\'employee E\',\'E.employee_id = P.employee_id \');
    $this-&g         


        
3条回答
  •  温柔的废话
    2021-01-06 14:43

    I have used the same condition in core PHP you can simply implement it on Codeigniter if any issue gets while implementing let me know

    SELECT * FROM `test` WHERE Year('payscale_date') = 2016 and Month('payscale_date') = 05
    

提交回复
热议问题