You are here

function hosting_db_server_update in Hosting 5

Implementation of hook_update().

As an existing node is being updated in the database, we need to do our own database updates.

File

db_server/hosting_db_server.module, line 183

Code

function hosting_db_server_update($node) {

  // if this is a new node or we're adding a new revision,
  if ($node->revision) {
    hosting_db_server_insert($node);
  }
  else {
    db_query("UPDATE {hosting_db_server} SET \n                  db_type = '%s', db_user = '%s', db_passwd = '%s'\n              WHERE \n                  vid = %d", $node->db_type, $node->db_user, $node->db_passwd, $node->vid);
  }
}