empr_fields)) { return false; } pmb_mysql_query("TRUNCATE TABLE empr_renewal_form_fields"); $values = array(); foreach ($this->empr_fields as $empr_field_code => $options) { $values[] = "('".addslashes($empr_field_code)."', ".$options['display'].", ".$options['mandatory'].", ".$options['alterable'].", '".addslashes($options['explanation'])."')"; } $query = "INSERT INTO empr_renewal_form_fields (empr_renewal_form_field_code, empr_renewal_form_field_display, empr_renewal_form_field_mandatory, empr_renewal_form_field_alterable, empr_renewal_form_field_explanation) VALUES ".implode(',', $values); pmb_mysql_query($query); return true; } protected function get_empr_fields_query() { $query = "SELECT empr_renewal_form_field_code, empr_renewal_form_field_display, empr_renewal_form_field_mandatory, empr_renewal_form_field_alterable, empr_renewal_form_field_explanation FROM empr_renewal_form_fields"; return $query; } }