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 11.03.2006, 17:01   #1
Shawnmb
Архивный участник
 
Join Date: Feb 2005
Posts: 307
Default [FIX] Cache cannot load week playtime

The warning message cache spams when a user without time data logs in:
Quote:
Originally Posted by Cache
03/11/2006 02:30:xx.xx7, [Account.cpp][381]Error. Cannot load Week play time, account id [xxxxx]
03/11/2006 02:30:xx.xx1, [Account.cpp][321] Cannot load day uesed time for account [xxxxx]
This may have been posted before, don't know, didn't check, but it works.
I wrote this in about 2 minutes and didnt bother to make it quick to run, because you only need to do it once. It takes about 5 minutes on SQL 2000 and 15 seconds on 2005.

Code:
Declare @acc int
Set @acc = 0

WHILE(@acc < 150000)
BEGIN
INSERT lin2world.dbo.time_data (account_id, last_logout, used_sec)
VALUES (@acc, '1/1/2004 1:00:00 AM', '0')
Set @acc = @acc + 1
END
(I wrote this again from memory after 2 nights of no sleep, hope I didn't make any typos)

Edit: This should leave current time data which already exists in tact, SQL errors and continues when a duplicate row is detected in INSERT.
Shawnmb 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:39.