original_string: function LastInsertID(&$db,$fieldname)
  	{
  		if ($db->hasInsertID) {
  			$val = $db->Insert_ID($this->_table,$fieldname);
  		}
  		else {
  			$val = false;
  		}
  
  		if (is_null($val) || $val === false) {
  			// this might not work reliably in multi-user environment
  			return $db->GetOne("select max(".$fieldname.") from ".$this->_table);
  		}
  		return $val;
  	}
code: function LastInsertID(&$db,$fieldname)
  	{
  		if ($db->hasInsertID) {
  			$val = $db->Insert_ID($this->_table,$fieldname);
  		}
  		else {
  			$val = false;
  		}
  
  		if (is_null($val) || $val === false) {
  			// this might not work reliably in multi-user environment
  			return $db->GetOne("select max(".$fieldname.") from ".$this->_table);
  		}
  		return $val;
  	}
code_tokens: function LastInsertID ( & $ db , $ fieldname ) { if ( $ db -> hasInsertID ) { $ val = $ db -> Insert_ID ( $ this -> _table , $ fieldname ) ; } else { $ val = false ; } if ( is_null ( $ val ) || $ val === false ) { // this might not work reliably in multi-user environment return $ db -> GetOne ( "select max(" . $ fieldname . ") from " . $ this -> _table ) ; } return $ val ; }
docstring: get last inserted id for INSERT
docstring_tokens: get last inserted id for INSERT