debuggsen

This commit is contained in:
Flummi 2017-03-22 00:31:30 +01:00
parent 8c99039312
commit d52e4249a1

View File

@ -9,10 +9,10 @@ module.exports = (lib) => {
args.shift(); args.shift();
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) if(args.length > 0)
query += "where `username` like '" + args.join("' || `username` like '"); query += "where `username` like '" + args.join("' || `username` like '");
query += "limit 1"; query += "order by rand() limit 1";
console.log( query ); console.log( query );
lib.sql.query(query, (err, rows, fields) => { lib.sql.query(query, (err, rows, fields) => {