This is the function in the CI model:
public function libraryClean() {
$killCount=0;
$rows=$this->db->get('mz')->result();
foreach ($rows as $row) {
$rID=$row->rID;
$title=$row->title;
$char=$title[0];
if (ctype_lower($char)) {
$killCount++;
// delete $row code goes here
}
}
return $killCount;
}
I've unsuccessfully tried various approaches. Thanks in advance.