[Help] Website Online Count

11/06/2020 03:44 TheRealMadara#1
Hello! greetings epvp. there is a problem with my online count in website. its not going up. it always says zero. I investigated the inc files.


and this is the code. from website online count
odbc_exec($mssql, 'USE [ACCOUNT_DBF]');
$online = odbc_exec($mssql, 'SELECT COUNT(*) as count FROM [ACCOUNT_TBL] WHERE isuse = \'J\'');

<td>Online User:</td>
<td><?php echo odbc_result($online, 'count'); ?></td>

then. I go to my database in account_dbf. I check the isuse. and all are T even tho I am online.
also, the multiverse in character_table always stay at zero. even tho im online. omg.

what to do with this? thanks guys!
11/07/2020 02:13 xTwiLightx#2
Better use the Multiserver column in the CHARACTER_TBL of the CHARACTER_01_DBF.
11/07/2020 07:16 TheRealMadara#3
Quote:
Originally Posted by xTwiLightx View Post
Better use the Multiserver column in the CHARACTER_TBL of the CHARACTER_01_DBF.
Hello xTwilight! thanks for the reply, I checked the multiserver column in CHARACTER_TBL. it always stays at 0 even when im logged in or logged out. any clue on why that is? thanks again!
11/07/2020 09:07 Tamus#4
Quote:
Originally Posted by TheRealMadara View Post
Hello xTwilight! thanks for the reply, I checked the multiserver column in CHARACTER_TBL. it always stays at 0 even when im logged in or logged out. any clue on why that is? thanks again!
check your function if its local ip or online ip
11/07/2020 09:56 TheRealMadara#5
Quote:
Originally Posted by Tamus View Post
check your function if its local ip or online ip
thanks for the reply tamus. what file do I need to check for the ip? thanks
11/07/2020 12:16 aqwp#6
Use this
[Only registered and activated users can see links. Click Here To Register...]
11/07/2020 13:54 TheRealMadara#7
Quote:
Originally Posted by aqwp View Post
Use this
[Only registered and activated users can see links. Click Here To Register...]
Thanks. I will try to run this script in my database and update you what hapenned

Lifesaver man! it worked for me! you got my thanks! :D
11/07/2020 14:02 aqwp#8
You're welcome, had this issue myself a while back, cost me some days to find out where the issue came from aswell.
11/07/2020 16:25 Tamus#9
Quote:
Originally Posted by TheRealMadara View Post
thanks for the reply tamus. what file do I need to check for the ip? thanks
here
PHP Code:
    $_CONFIG['allg_user_online'] =  [MENTION=311501]ODB[/MENTION]c_result [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect'SELECT     COUNT([MultiServer]) as OnlineCount FROM [' $_CONFIG['db_databases']['chr'] . '].[dbo].[CHARACTER_TBL] WHERE [MultiServer] > 0'), 'OnlineCount'); 
11/16/2020 18:11 Wezzy_Dev#10
Quote:
Originally Posted by TheRealMadara View Post
Hello! greetings epvp. there is a problem with my online count in website. its not going up. it always says zero. I investigated the inc files.


and this is the code. from website online count
odbc_exec($mssql, 'USE [ACCOUNT_DBF]');
$online = odbc_exec($mssql, 'SELECT COUNT(*) as count FROM [ACCOUNT_TBL] WHERE isuse = \'J\'');

<td>Online User:</td>
<td><?php echo odbc_result($online, 'count'); ?></td>

then. I go to my database in account_dbf. I check the isuse. and all are T even tho I am online.
also, the multiverse in character_table always stay at zero. even tho im online. omg.

what to do with this? thanks guys!


ONLINE COUNT PHP CODE
11/21/2020 02:54 Tamus#11
Quote:
Originally Posted by Wezzy_Dev View Post
ONLINE COUNT PHP CODE
welcome back rjay bacaya
08/26/2022 21:49 rdenheijer#12
i begin to wonder if this is right or wrong and/or i miss something
$_CONFIG['allg_user_online'] = odbc_result(odbc_exec($odbc_connect, 'SELECT COUNT([MultiServer]) as OnlineCount FROM [' . $_CONFIG['db_databases']['chr'] . '].[dbo].[CHARACTER_TBL] WHERE [MultiServer] !=0; '), 'OnlineCount');

what ever i do its stay 0 also in the sql manager is see multiserver but stays 0

Quote:
Originally Posted by Tamus View Post
here
PHP Code:
    $_CONFIG['allg_user_online'] =   [MENTION=311501]ODB[/MENTION]c_result  [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect'SELECT     COUNT([MultiServer]) as OnlineCount FROM [' $_CONFIG['db_databases']['chr'] . '].[dbo].[CHARACTER_TBL] WHERE [MultiServer] > 0'), 'OnlineCount'); 
if have try this however am sorry but it doesnt work
i have this: $_CONFIG['allg_user_online'] = odbc_result(odbc_exec($odbc_connect, 'SELECT COUNT([MultiServer]) as OnlineCount FROM [' . $_CONFIG['db_databases']['chr'] . '].[dbo].[CHARACTER_TBL] WHERE [MultiServer] !=0; '), 'OnlineCount');
and player online well still 0

okay i tryed this $_CONFIG['allg_user_online'] = @[Only registered and activated users can see links. Click Here To Register...]c_result @[Only registered and activated users can see links. Click Here To Register...]c_exec($odbc_connect, 'SELECT COUNT([MultiServer]) as OnlineCount FROM [' . $_CONFIG['db_databases']['chr'] . '].[dbo].[CHARACTER_TBL] WHERE [MultiServer] > 0'), 'OnlineCount');
but got this error : Parse error: syntax error, unexpected '=', expecting ']' in C:\xampp\htdocs\includes\xinc_config.php on line 76