<?php

include 'icl/show#record#.inc.php';

function update#record#(){
	$#primarykey#=GETVAL('#primarykey#');	
#iterator-fieldlist-servervars#

	global $db;
	$user=userinfo();
	$gsid=$user['gsid']+0;
	
	checkgskey('update#record#_'.$#primarykey#);

	$query="update #tablename# set #iterator-fieldlist-update# where gsid=? and #primarykey#=?";
	sql_prep($query,$db,array(#iterator-fieldlist-sqlplist#,$gsid,$#primarykey#));

	logaction("updated #c_record# #$#primarykey# $#dispfield#",
		array('#primarykey#'=>$#primarykey#,'#dispfield#'=>"$#dispfield#"),
		array('rectype'=>'#record#','recid'=>$#primarykey#));

	show#record#($#primarykey#);
}