From d52e4249a142e27b04bdceebd25ca4db6e5c5903 Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 22 Mar 2017 00:31:30 +0100 Subject: [PATCH] debuggsen --- src/trigger/f0ckrand.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trigger/f0ckrand.js b/src/trigger/f0ckrand.js index 10afda6..2f813af 100644 --- a/src/trigger/f0ckrand.js +++ b/src/trigger/f0ckrand.js @@ -9,10 +9,10 @@ module.exports = (lib) => { args.shift(); args.shift(); - let query = "select `id`,`username` from `f0ck`.`items` order by rand() "; + let query = "select `id`,`username` from `f0ck`.`items` "; if(args.length > 0) query += "where `username` like '" + args.join("' || `username` like '"); - query += "limit 1"; + query += "order by rand() limit 1"; console.log( query ); lib.sql.query(query, (err, rows, fields) => {