varq="SELECT `participant` FROM `participants` WHERE `participant`="+sql.escape(user)+" AND `id` IN (SELECT `id` FROM `rooms` WHERE `name`="+sql.escape(room)+" AND `token`="+sql.escape(token)+");";
varq="SELECT `participant` FROM `participants` WHERE `participant`="+sql.escape(user)+" AND `room_id` IN (SELECT `id` FROM `rooms` WHERE `name`="+sql.escape(room)+" AND `token`="+sql.escape(token)+");";
console.log('Checking if '+user+' is allowed to join room '+room+' using token '+token);