I'm about to update one of my old vqmods for Opencart 2.0.3.1. It's an extension sending birthday emails to customers. I've managed to update nearly all code, but one thing remains. I can't figure out how to change the while loop in the example below. This is probably a very simple question for experienced programmers, but for a beginner like me it's really hard.
Code: Select all
//Find the customers whose birthday is today
$findCustomers = $this->db->query("SELECT * FROM customer WHERE substr(birth_date,6) = '" . $todayDate . "'");
while($row = mysql_fetch_array($findCustomers)){
$birthDate = $row['birth_date'];
$birthEmail = $row['bday_email'];
$age = $thisYear - (substr($birthDate,0,4));
I would really appreciate any hint how to solve this.