[Help] Online Count Bug ?

Results 1 to 10 of 10
  1. #1
    Trust your senses Gravious is offline
    MemberRank
    Sep 2009 Join Date
    NetherlandsLocation
    713Posts

    [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
    Last edited by Gravious; 17-01-11 at 08:20 PM.


  2. #2
    Apprentice nabbers2011 is offline
    MemberRank
    Jan 2011 Join Date
    8Posts

    Re: [Help] Online Count Bug ?

    wrong table

  3. #3
    Trust your senses Gravious is offline
    MemberRank
    Sep 2009 Join Date
    NetherlandsLocation
    713Posts

    Re: [Help] Online Count Bug ?

    That didn't matter, it just doesn't update that row, neither in ACCOUNT_TBL...

  4. #4
    Member Hcsmurf is offline
    MemberRank
    Nov 2010 Join Date
    NetherlandsLocation
    84Posts

    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.

  5. #5
    Apprentice nabbers2011 is offline
    MemberRank
    Jan 2011 Join Date
    8Posts

    Re: [Help] Online Count Bug ?

    Quote Originally Posted by TheUndead View Post
    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

  6. #6
    Trust your senses Gravious is offline
    MemberRank
    Sep 2009 Join Date
    NetherlandsLocation
    713Posts

    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 View Post
    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.

  7. #7
    Proficient Member Joey is offline
    MemberRank
    Nov 2010 Join Date
    MissouriLocation
    159Posts

    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.

  8. #8
    Trust your senses Gravious is offline
    MemberRank
    Sep 2009 Join Date
    NetherlandsLocation
    713Posts

    Re: [Help] Online Count Bug ?

    Sadly enough that didn't fix it :|
    I already had that procedure and the query.

  9. #9
    Flyff Developer ShadowDragon is offline
    MemberRank
    Apr 2009 Join Date
    1,916Posts

    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.

  10. #10
    127.0.0.1 Groxy101 is offline
    MemberRank
    Apr 2010 Join Date
    417Posts

    Re: [Help] Online Count Bug ?

    bump :)



Advertisement