$query = mssql_query("Select ctlcode,AccountID From Character where ctlcode='32'");
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$row[1]' and connectstat='1'");
$online = mssql_num_rows($queryonline);
if($online >= 1)
{
$queryname = mssql_query("Select GameIDC from AccountCharacter where id='$row[1]'");
$name = mssql_fetch_row($queryname);
}
if($name[0] == $row[0]) { $status = "<font color='green'>Online</font>"; }
else{ $status = "<font color='#ff0000'>Offline</font>"; }