Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 26.02.2006, 02:53   #1
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default SQL - Importing data from older DB.

Hey!

I had some problems today with a renegade..

He used a lot of other players accounts and stripped all chars.

Unfortunately if I rollback people will kill me.. so the only thing I can do is update the dbo.user_item.

I had done it once like this:

[php:1:d862c98d03]
declare
@char_id int,
@item_type int,
@amount int,
@enchant int,
@eroded int,
@bless int,
@ident int,
@wished int,
@warehouse int

select @char_id = char_id from lin2world2.dbo.user_item where item_id = '119173'
select @item_type=item_type from lin2world2.dbo.user_item where item_id = '119173'
select @amount=amount from lin2world2.dbo.user_item where item_id = '119173'
select @enchant=enchant from lin2world2.dbo.user_item where item_id = '119173'
select @eroded=eroded from lin2world2.dbo.user_item where item_id = '119173'
select @bless=bless from lin2world2.dbo.user_item where item_id = '119173'
select @ident=ident from lin2world2.dbo.user_item where item_id = '119173'
select @wished=wished from lin2world2.dbo.user_item where item_id = '119173'
select @warehouse=warehouse from lin2world2.dbo.user_item where item_id = '119173'

update lin2world.dbo.user_item
set char_id = @char_id,
item_type = @item_type,
amount = @amount,
enchant = @enchant,
eroded = @eroded,
bless = @bless,
ident = @ident,
wished = @wished,
warehouse = @warehouse
where item_id = '119173'; [/php:1:d862c98d03]

But this time it is for various accounts and too many chars...

THere has to be an easier way to do this.. can anyone please enlighten me?

THanks in advance!
Megatronpt is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:59.