Merge branch 'f0ckdev' into 'master'
need coffee plox See merge request !99
This commit is contained in:
commit
72df37f103
|
@ -22,8 +22,8 @@ module.exports = (lib) => {
|
|||
let vars = params.in.concat(params.not);
|
||||
|
||||
params.in = new Array(params.in.length).fill('username LIKE ?');
|
||||
params.out = params.in.length > 0 ? [] : new Array(params.out.length).fill('username NOT LIKE ?');
|
||||
let where = params.in.concat(params.out);
|
||||
params.not = params.in.length > 0 ? [] : new Array(params.not.length).fill('username NOT LIKE ?');
|
||||
let where = params.in.concat(params.not);
|
||||
let query = `SELECT id, username FROM f0ck.items ${where.length > 0 ? `WHERE ${where.join(' || ')}` : ''} ORDER BY rand() LIMIT 1`;
|
||||
|
||||
console.log( query );
|
||||
|
|
Loading…
Reference in New Issue
Block a user