domain_conf_variable_save($domain_id, $variable, $value = NULL)Store a single variable in {domain_conf}.
@link http://drupal.org/node/367963
$domain_id The unique domain ID that is being edited.
$variable The name of the variable you wish to set.
$value The value of the variable to set. You may leave this value blank in order to unset the custom variable.
domain_conf/domain_conf.module, line 747
<?php
function domain_conf_variable_save($domain_id, $variable, $value = NULL) {
// Get the current settings for this domain, if any.
$settings = domain_unserialize(db_result(db_query("SELECT settings FROM {domain_conf} WHERE domain_id = %d", $domain_id)));
// Settings found, update them.
if (!empty($settings)) {
$settings[$variable] = $value;
db_query("UPDATE {domain_conf} SET settings = %b WHERE domain_id = %d", serialize($settings), $domain_id);
}
else if (domain_lookup($domain_id) != -1) {
$settings = array($variable => $value);
db_query("INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, %b)", $domain_id, serialize($settings));
}
}
?>