Skip to content

Commit

Permalink
πŸ› Insults are not refreshed
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilInsultGenerator authored Jun 12, 2022
1 parent b25acea commit 6d0f28b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions db.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$dbconfig['char'] = 'utf8';
$active_insult = 1;

$sql_insult = "SELECT
/* $sql_insult = "SELECT
number,
language,
insult,
Expand All @@ -19,7 +19,13 @@
WHERE number >= RAND() * (SELECT MAX(number) FROM insults WHERE active = :active and language = :lang )
AND language = :lang
AND active = :active
ORDER BY number LIMIT 1;
ORDER BY number LIMIT 1; */

$sql_insult = "SELECT
*
FROM insults AND acitve= :active
WHERE language= :lang
ORDER BY RAND() number LIMIT 1;
";

$update_counter = "UPDATE insults SET shown = shown + 1 WHERE number = :number";
Expand Down

0 comments on commit 6d0f28b

Please sign in to comment.