/** Function to save the user preferences to db * */ function savePreferecesToDB() { $data = base64_encode(serialize($this->user_preferences)); $query = "UPDATE $this->table_name SET user_preferences=? where id=?"; $result =& $this->db->pquery($query, array($data, $this->id)); $this->log->debug("SAVING: PREFERENCES SIZE ". strlen($data)."ROWS AFFECTED WHILE UPDATING USER PREFERENCES:".$this->db->getAffectedRowCount($result)); $_SESSION["USER_PREFERENCES"] = $this->user_preferences; }