function user_stats_update_1 in User Stats 5
Implementation of hook_update()
File
- ./
user_stats.install, line 55
Code
function user_stats_update_1() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
// We use 4 instead of PROFILE_HIDDEN as this constant is not available during updates
$ret[] = update_sql("INSERT IGNORE INTO {profile_fields} (\n title, name, explanation, category, page, type, weight, required, register, visibility, options) VALUES\n ('IP Address', 'user_ip_address', '', 'Statistics', '', 'textfield', 0, 0, 0, 4, '')");
break;
}
return $ret;
}