You are here

function hosting_site_data_update in Hosting 6.2

Implementation of hook_update()

1 call to hosting_site_data_update()
hosting_site_data_nodeapi in example/site_data/hosting_site_data.module
Implementation of hook_nodeapi()

File

example/site_data/hosting_site_data.module, line 38

Code

function hosting_site_data_update($node) {
  if (FALSE === db_fetch_array(db_query("SELECT site_data FROM {hosting_site_data} WHERE vid = %d", $node->vid))) {
    hosting_site_data_insert($node);
  }
  else {
    db_query("UPDATE {hosting_site_data} SET site_data = '%s' WHERE vid = %d", $node->site_data, $node->vid);
  }
}