var anim_speed = 300; // пикселей в секунду
var anim_time = (top * 1000) / anim_speed; // 1000 - поправка на милисекунды
//анимируем переход на расстояние
$('body,html').animate({scrollTop: top}, anim_time);
//забираем идентификатор блока с атрибута href
var id = $(this).attr('href'),
//узнаем высоту от начала страницы до блока на который ссылается якорь
top = $(id).offset().top;
//анимируем переход на расстояние - top за 2000 мс
$('body,html').animate({scrollTop: top}, 500);
(SELECT @p_count := 0, @post_id := -1) r
@p_count := if(@post_id != p.id, @post_id + 1, @post_id) as p_count,
@post_id := p.id
то client.r = user.id
SELECT orders, users, .... if(
client.contact = 'phone' and client.r != '', --условие
user.id, -- берем этот атрибут в случае true
client.r -- берем этот атрибут в случае false
) as user_ident
FROM .....
WHERE
Select *
from (Select p.id as post_id, p.create_date as p_create_date, p.title as p_title, p.text as p_text,
img.id as img_id, img.name as img_name,
v.id as v_id, v.name as v_name,
@p_count := if(@post_id != p.id, @post_id + 1, @post_id) as p_count,
@post_id := p.id
from posts p
left join images img on img.post_id = p.id
left join videos v on v.post_id = p.id,
(SELECT @p_count := 0, @post_id := -1) r
where p.id > :start_post_id
and @p_count <= :post_count
order by p.create_date
) a
where a.p_count < :post_count
function set_title_data(target)
{
if(target.getAttribute('title') === '')
{
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ") >= 0 || ua.indexOf("Trident/") >= 0 || ua.indexOf("Edge/") >= 0;
target.setAttribute('title', 'Ждите, идет загрузка данных...');
setTimeout(function()
{
target.setAttribute('title', 'Готово! Данные получены!');
target.style.display = 'none';
target.style.display = msie ? 'block' : 'initial';
}, 2000);
}
}
Проблема в тексте запроса и фактическом содержимом БД.