fix: super-strange id + 0 query that totally prevents the use of indexes

This commit is contained in:
Martin Ambrus
2017-10-24 09:55:18 +02:00
parent d12be30634
commit aab1010906
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -485,7 +485,7 @@ if($_POST['password'] != ""){
$text = preg_replace("'%TEKST%'",ARTEFACT ,$text);
fwrite($fh, $text);
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC";
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id DESC";
$result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink));
for ($i=0; $row=mysqli_fetch_row($result); $i++) {
$updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")