SELECT t1.radacctid
, t1.username
, t1.acctstarttime
, t1.acctstoptime
, t1.framedipaddress
, COUNT(*) as cnt
FROM radpostauth t1
WHERE exists (
SELECT *
FROM radacct t2
WHERE
`nasipaddress` = '146.120.17.42'
AND t1.authdate between t2.acctstarttime AND t2.acctstoptime
)
AND `reply` = 'Access-Accept'
AND `authdate` BETWEEN DATE_SUB(NOW(), INTERVAL 1 MONTH) AND NOW()
GROUP BY t1.`username` -- это важно
/(?:[^\n]*\n){4}([\s\S]*)/
Стрелочные функции не создают собственный контекст this, а используют значение this окружающего контекста.© mdn
$('.iStepsR').on('click', '.iStepsTabTitle', function(){
let $tab = $(this).closest('.iStepsTab')
$tab.toggleClass('active')
.siblings().removeClass('active')
})
select * from users where id%5=0
$('input, select, textarea, ' +
'a[data-toggle="foo"], p[target="bar"],' +
'#hello'
)