how to add objects change (more powerful) with this script?
Code:
Use Telecaster DECLARE @id int; --accountid DECLARE @itemcount int; --Anzahl der Items DECLARE @item int; DECLARE @avatarid int; -----------Insert Settings here----------------- SET @item = '' --INSERT ITEM ID (e.g. 2010764 R6 Cloak) SET @itemcount = '1' --INSERT THE NUMBER OF ITEMS SELECT @avatarid = sid FROM Character WHERE name = '' --INSERT CHARACTER NAME ------------------------------------------------ SELECT @id = account_id FROM Character WHERE sid = @avatarid --Warning IF @id IS NULL BEGIN PRINT 'WARNING: This Character does not exist. No Rows affected!' RETURN END --DB Update INSERT INTO [telecaster].[dbo].[PaidItem]([account_id],[avatar_id],[avatar_name],[item_code],[item_count],[rest_item_count],[bought_time],[valid_time],[server_name],[taken_avatar_id],[taken_avatar_name],[taken_server_name],[taken_time],[taken_account_id],[confirmed],[confirmed_time]) VALUES (@id,@avatarid,NULL,@item,@itemcount,@itemcount,'2011-10-01 12:00:00.000',NULL,NULL,NULL,NULL,NULL,NULL,@id,NULL,NULL)