Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Mizter Egoist 03.04.2015 12:17
Вот адаптировал немного:$tAnswered[^table::sql{ SELECT id, sectionID, threadID, parentID, uID, date, mess, closed FROM questions AS q WHERE parentID = 0 AND sectionID = '$advices.section.id' AND ( SELECT COUNT(id) FROM questions WHERE threadID = q.threadID AND parentID <> 0 AND uID = '$initialization.auth.uID' ) > 0 }] $tWaiting[^table::sql{ SELECT id, sectionID, threadID, parentID, uID, date, mess, closed FROM questions AS q WHERE parentID = 0 AND sectionID = '$advices.section.id' AND ( SELECT COUNT(id) FROM questions WHERE threadID = q.threadID AND parentID <> 0 ) = 0 }] ^if($tAnswered){ <h2>Ваши консультации</h2> ^tAnswered.menu{<a href="/${form:url}?q=${tAnswered.threadID}">$tAnswered.mess</a><br>} } ^if($tWaiting){ <h2>Новые вопросы</h2> ^tWaiting.menu{<a href="/${form:url}?q=${tWaiting.threadID}">$tWaiting.mess</a><br>}<br> }Все работает на ура.