refactor: SELECT * replaced by SELECT fieldname1, fieldname2 ...

So far in a few places.
This commit is contained in:
Martin Ambrus
2017-11-05 09:03:59 +01:00
parent 740c28f136
commit 57057384d3
6 changed files with 133 additions and 101 deletions
+3 -3
View File
@@ -371,10 +371,10 @@ if (!isset($SAJAX_INCLUDED)) {
global $session,$database;
$alliance = $database->escape($session->alliance);
$query = mysqli_query($GLOBALS['link'],"select * from ".TB_PREFIX."chat where alli='$alliance' order by id desc limit 0,13");
$query = mysqli_query($GLOBALS['link'],"select id_user, name, date, msg from ".TB_PREFIX."chat where alli='$alliance' order by id desc limit 0,13");
while ($r = mysqli_fetch_array($query)) {
$dates = date("g:i",$r[date]);
$data .= "[{$dates}] <a href='spieler.php?uid={$r['id_user']}'>{$r['name']}</a>: {$r[msg]} <br>";
$dates = date("g:i",$r['date']);
$data .= "[{$dates}] <a href='spieler.php?uid={$r['id_user']}'>{$r['name']}</a>: {$r['msg']} <br>";
}
return $data;
}