Newbie Spellweaver
- Joined
- Feb 11, 2019
- Messages
- 25
- Reaction score
- 1
Hello!
I am a beginner in coding so I started to put a online colum in my ranking system of MuOnline. Having the $quey's written I am looking for someone who can help me find my error I will write only the colum and the lines I wrote.having the usual line $query
So the result in my ranking is empty.
So now, trying the other way. I get only one result from the colum.table.db. which is 0 = Offline
It's obvious that I use <td>'.$line[0].'</td> in the Status where it shows Online or Empty. If there are dudes of my lines ask me so I explain more detailed.
So my Idea is to show if the players are online or not, and to make it done the line have to read '1' so it can show online. It's complicated to me and as I told you I am a beginner. The lines I took by myself reading other lines from MuCore.
Info.
PHP +7.1.x
SQL 2018.
Web: MuCore version of Kevin Fernandez.
The $row[1] is already fixed to make the class work giving me each name of the race.
Code:
$query = "SELECT TOP 30 Name,Class,cLevel,RESETS,mLevel,Grand_Resets,WinDuels,MapNumber,AccountID from Character where CtlCode < '8' order by Grand_Resets desc, RESETS desc, WinDuels desc";
$rank_char = $core_db->getAll($query);
for($i=0;
$i < count($rank_char);++$i)
{
$row = $rank_char[$i];
$acc_id=$row['AccountID'];
$line = sqlsrv_query("SELECT ConnectStat FROM Me_MuOnline.dbo.MEMB_STAT where memb___id='$acc_id'")
$rank = $i+1;
if ($line['ConnectStat'])
{0 == 'Offline';}
else {1 == 'Online';}
echo' Here will be the tables html I am supposed to write but I resume to not write here';
}
So now, trying the other way. I get only one result from the colum.table.db. which is 0 = Offline
Code:
$query = "SELECT TOP 30 Name,Class,cLevel,RESETS,mLevel,Grand_Resets,WinDuels,AccountID from Character where CtlCode < '8' order by Grand_Resets desc, RESETS desc, WinDuels desc";
$rank_char = $core_db->getAll($query);
for($i=0;
$i < count($rank_char);++$i)
{
$row = $rank_char[$i];
$acc_id=$row['AccountID'];
$line = sqlsrv_query("SELECT ConnectStat FROM Me_MuOnline.dbo.MEMB_STAT where memb___id='$acc_id'")
$rank = $i+1;
if($line[0] == 0)
{$line[0] = 'Offline';}
else if($line[0] == 1)
{$line[0] = 'Online';}
else{$line[0] = 'Offline';}
echo '[LEFT][COLOR=#222222]Here will be the tables html I am supposed to write but I resume to not write here' [/COLOR];
[/LEFT]
}
It's obvious that I use <td>'.$line[0].'</td> in the Status where it shows Online or Empty. If there are dudes of my lines ask me so I explain more detailed.
So my Idea is to show if the players are online or not, and to make it done the line have to read '1' so it can show online. It's complicated to me and as I told you I am a beginner. The lines I took by myself reading other lines from MuCore.
Info.
PHP +7.1.x
SQL 2018.
Web: MuCore version of Kevin Fernandez.
The $row[1] is already fixed to make the class work giving me each name of the race.
Thank you for your answer guys
Attachments
You must be registered for see attachments list
Last edited: