View Single Post
Old 21.05.2006, 17:48   #10
Haygor
Архивный участник
 
Join Date: Apr 2006
Posts: 36
Default

Simple, create a trigger

Code:
CREATE TRIGGER trig_ModChar3 
ON [dbo].[user_data] 
FOR UPDATE
AS

DECLARE @currxp INT

IF NOT UPDATE (exp)
BEGIN
RETURN
END

SELECT @currxp = (SELECT exp FROM DELETED)

IF @currxp > 2067940873

UPDATE user_data SET exp = 2067940873
This is not tested, but should work. Change the 2067940873 to whatever you want the max to be.

EDIT NOTE: Grrrr, typos for the win
Haygor is offline