Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Cep}|{ 17.11.2002 19:17
ой.. да ты действительно чайник. надо писать функции для обработки УРЛ-ов, родной.@newsByDay[y;m] $sdate[^date::create($y;$m)] $ssdate[^sdate.sql-string[]] $date[^ssdate.mid(0;7)] ^connect[$SQL.connstring]{ $result[^hash::sql{SELECT DATE_FORMAT(dateadd, '%d') AS daynews, id FROM news WHERE dateadd LIKE '$date%'}] } # SELECT DATE_FORMAT(dateadd, '%d') AS daynews, COUNT(id) AS nc FROM news WHERE dateadd LIKE '2002-09%' GROUP BY daynews @getNewsByDate[y;m;d] $sdate[^date::create($y;$m;$d)] $ssdate[^sdate.sql-string[]] $date[^ssdate.mid(0;10)] ^connect[$SQL.connstring]{ $result[^table::sql{SELECT n.id, n.userid, n.topicid, n.title as ntitle, n.text, n.dateadd, t.title as ttitle, t.pic, u.name, u.email FROM news AS n, topics AS t, users AS u WHERE (dateadd LIKE '%$date%') AND n.topicid = t.id AND n.userid = u.id ORDER BY dateadd DESC}] }@newsbyday проверяет новости по дням месяца