I need to use a like in foreach but without success, I did the following:
$arr = array('\'%a%\'', '\'%b%\'', '\'%c%\'');
foreach ($arr as $a){
$this->SQL = "update client set active=1 where date between ? and ? and type like ?"
$this->SQL =$this->PDO->prepare($this->SQL);
$this->SQL->execute(array($this->Since, $this->Until, $a));
}
It runs but does not perform the update, I tried with var_dump to see what happened, but I did not succeed. Someone who has gone through this and managed to solve?
Thank you =]