I am trying to update records on a database table where the date column matches the present year and month. I keep getting this error
Incorrect datetime value: '%2018-06%' for column 'created_at'
This is what I am doing
$current_month = date("Y-m");
$points = 4;
$freelancer_id =4;
$update = "UPDATE monthly_limits SET points = :points WHERE freelancer_id = :freelancer_id AND
created_at LIKE concat('%', :current_month, '%')";
$query = $this->db->prepare($update);
$query->bindParam("points", $points);
$query->bindParam("current_month", $current_month);
$query->bindParam("freelancer_id", $freelancer_id);
$query->execute();
Please how do I resolve this?