select a.*
from (select m.*, u.*, count(select *
from messages as m2
join users as u2 on u2.id = m2.author
where m2.recipient = 1
and u2.id = u.id -- имитация клаузы partition by
and m2.id > m.id -- имитация клаузы order by ... desc
) as row_num, -- аналог row_number через оконную функцию:
-- row_number() over(partition by u.id order by m.id desc) as row_num
from messages as m
join users as u on u.id = m.author
where m.recipient = 1
) as a
where a.row_num = 1 -- берем 1 строку по ранжированному счетчику в пределах каждого id пользователя
\w+\s"(?<=").*(?=")"
"ДокРу00001.Р1"
что должно происходить при отправке первого сообщения пользователем А пользователю B?
Но будет 2 вычисления MD5
where value = reverse_md5(:hache)
UTF-8 -> encode1 -> encode2 (encode3) -> UTF-8
$out_str = iconv('UTF-8', $encode1.'//IGNORE', $in_str);
$out_str = iconv($encode1, $encode2.'//IGNORE', $out_str);
$out_str = iconv($encode3, 'UTF-8//IGNORE', $out_str);
$ iconv -l
$all_encoding = []; // сюда вставляем список всех кодировок iconv
$out_encoding = array_filter($all_encodings, function($item){return strpos(strtolower($item), 'cp') !== false;});
foreach($out_encoding as $encode1)
{
foreach($out_encoding as $encode2)
{
foreach($out_encoding as $encode3)
{
$str = iconv('UTF-8', $encode1.'//IGNORE', $out);
$str = iconv($encode1, $encode2.'//IGNORE', $str);
$str = iconv($encode3, 'UTF-8//IGNORE', $str);
if($str !== false && $str !== '')
echo $encode1.'::'.$encode2.'::'.$encode3.'::'.$str.'<br>';
}
}
}
UTF-8 -> cp437 -> cp437 (cp866) -> UTF-8
$out_str = iconv('UTF8', 'CP437//IGNORE', $in_str);
$out_str = iconv('CP437', 'CP437//IGNORE', $out_str);
$out_str = iconv('CP866', 'UTF8//IGNORE', $out_str);
nickinput.style.animation = "none";
setTimeout(function() {
if (validmail === false) {
mailinput.style.animation = "blinker 0.6s linear 3";
}
}, 0);
@keyframes blinker {
50% {
background-color: #b11515;
color: #aaa;
}
}
esc_url( get_pagenum_link( 999999999 ))
max( 1, get_query_var( 'paged' ) )
$query->max_num_pages
$curent_page = max(1, get_query_var( 'paged' )); // текущий номер страницы
$max_page_num = $query->max_num_pages; // общее количество страниц
$prev_page_num = $curent_page - 1 > 0 ? $curent_page - 1 : null; // номер следующей страницы, если ее нет, то null
$next_page_num = $curent_page + 1 < $max_page_num ? $curent_page + 1 : null; //номер предыдущей страницы, если ее нет, то null
$prev_page_link = is_null($prev_page_num) ? null : esc_url( get_pagenum_link($prev_page_num)); //ссылка на следующую страницу, если ее нет, то null
$next_page_link = is_null($next_page_num) ? null : esc_url( get_pagenum_link($next_page_num)); //ссылка на предыдущую страницу, если ее нет, то null
echo '<div class="pagination">'
.(is_null($prev_page_num) ? '' : '<a href="'.$prev_page_link .'">Prev</a> ')
.$curent_page.'/'.$max_page_num
.(is_null($next_page_num) ? '' : '<a href="'.$next_page_link .'">Next</a> ')
.'</div>';