Skip to content

Commit

Permalink
Usage table native OGSPY
Browse files Browse the repository at this point in the history
Passage sur les tables ogspy native TABLE_GAME_PLAYER et non superapix
  • Loading branch information
machine62 committed Jan 31, 2024
1 parent b31488e commit 68c8971
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions model/oversight.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
function getPlayer($defaultname="")
{
global $db;
$query="SELECT id_player, name_player , status";
$query.=" FROM " . TABLE_SPA_PLAYERS . " ";
$query="SELECT player_id, player , status";
$query.=" FROM " . TABLE_GAME_PLAYER . " ";
if ($defaultname!="")
{
$query.="WHERE name_player like '%".$db->sql_escape_string($defaultname)."%' ";
$query.="WHERE player like '%".$db->sql_escape_string($defaultname)."%' ";
}
$query.=" order by name_player ASC";
$query.=" order by player ASC";



$result = $db->sql_query($query);
$Tretour = array();

while ($tPlayer = $db->sql_fetch_row($result)) {
$Tretour[$tPlayer["id_player"]] = array("id_player" => $tPlayer["id_player"], "name_player" => $tPlayer["name_player"], "status" => $tPlayer["status"]);
$Tretour[$tPlayer["player_id"]] = array("id_player" => $tPlayer["player_id"], "name_player" => $tPlayer["player"], "status" => $tPlayer["status"]);

}
return $Tretour;
Expand All @@ -33,7 +33,7 @@ function getPlayer($defaultname="")
function getStatus()
{
global $db;
$result = $db->sql_query("SELECT distinct(status)FROM " . TABLE_SPA_PLAYERS . " order by status ASC ");
$result = $db->sql_query("SELECT distinct(status)FROM " . TABLE_GAME_PLAYER . " order by status ASC ");
$tRetour = array();

while ($tStatus = $db->sql_fetch_row($result)) {
Expand Down

0 comments on commit 68c8971

Please sign in to comment.