tableName = 'Member'; $this->userfilesDirectory = WWW_PATH . '/' . $this->userfilesDirectory . '/'; $this->DBObj($id); } function getNotExistingProfileImages() { $sql = 'SELECT `id`, `img` FROM ' . $this->tableNameDB . ' where `img` NOT LIKE ""'; $arrayMemberImages = $this->db->queryAll($sql); $notExistingProfileImages = array(); foreach ($arrayMemberImages as $key => $value ) { if (!file_exists($this->userfilesDirectory . $value['img']) ) { $notExistingProfileImages[] = $value; } } return $notExistingProfileImages; } function deleteMemberPhotoRecord($id) { $this->id = $id; return $this->update(array('img' => '')); } }