[Help] Online Count Bug ?
Ok, so yea, just like everyone, I'm using this to display the online count:
Code:
Players Online:
<?php
$getonline = mssql_query("SELECT * FROM [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL_DETAIL] WHERE isuse = 'J'");
echo mssql_num_rows($getonline);
?>
Although that isn't the problem, the problem is, that the 'isuse' column does not update when someone logs in and logs out.
Any suggestions on how to fix this? I don't really know how:/:
Re: [Help] Online Count Bug ?
Re: [Help] Online Count Bug ?
That didn't matter, it just doesn't update that row, neither in ACCOUNT_TBL...
Re: [Help] Online Count Bug ?
I am not sure, because I have no knowledge of this at all, still I want to try to help, maybe you find this usefull, I stumbled on it earlier today:
http://forum.ragezone.com/f457/flyff-backend-683887/
Maybe it will help you out somehow, srry if it didn't help.
Re: [Help] Online Count Bug ?
Quote:
Originally Posted by
TheUndead
That didn't matter, it just doesn't update that row, neither in ACCOUNT_TBL...
then ur table or db server are bugged. account_tbl update fine for me and it show correct online count on site
Re: [Help] Online Count Bug ?
Yes, that is why I'm asking for a way to fix it...
---------- Post added at 08:21 PM ---------- Previous post was at 06:42 PM ----------
Quote:
Originally Posted by
Hcsmurf
I am not sure, because I have no knowledge of this at all, still I want to try to help, maybe you find this usefull, I stumbled on it earlier today:
http://forum.ragezone.com/f457/flyff-backend-683887/
Maybe it will help you out somehow, srry if it didn't help.
Thanks for the help, but that file also uses the DB, which is my problem.
Re: [Help] Online Count Bug ?
Make sure your query is the following:
Code:
SELECT * FROM [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL_DETAIL] WHERE isuse='J'
The procedure "[dbo].[LOGINJOIN_STR]" in ACCOUNT_DBF is the following:
Code:
USE [ACCOUNT_DBF]
GO
/****** Object: StoredProcedure [dbo].[LOGINJOIN_STR] Script Date: 01/18/2011 14:19:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROC [dbo].[LOGINJOIN_STR]
@iGu CHAR(2) = 'A1',
@iaccount VARCHAR(32)
/***********************************************************************************
***********************************************************************************
***********************************************************************************
***********************************************************************************
LOGINJOIN_STR ????
??? : ???
??? : 2004.01.30
??? : 2004.04.08 @iGu = 'A3' WHERE ?? ??
ex) LOGINONOFF_STR 'A1','1234'
***********************************************************************************
***********************************************************************************
***********************************************************************************
***********************************************************************************/
AS
set nocount on
IF @iGu = 'A1' -- ON
BEGIN
UPDATE ACCOUNT_TBL_DETAIL
SET isuse = 'J'
WHERE account = @iaccount
RETURN
END
ELSE
IF @iGu = 'A2' -- OFF
BEGIN
UPDATE ACCOUNT_TBL_DETAIL
SET isuse = 'O'
WHERE account = @iaccount
RETURN
END
ELSE
IF @iGu = 'A3' -- ALL OFF
BEGIN
UPDATE ACCOUNT_TBL_DETAIL
SET isuse = 'O'
WHERE isuse = 'J'
RETURN
END
set nocount off
I could be wrong, but that is what updates your list, from my understanding.
Re: [Help] Online Count Bug ?
Sadly enough that didn't fix it :|
I already had that procedure and the query.
Re: [Help] Online Count Bug ?
i have the same problem. I'm not sure how to fix it, but i think i know the cause. My guess is that when people crash or close the game without properly logging out, the game doesn't have the chance to change that value in the database.
Re: [Help] Online Count Bug ?