$limit = 10; $result = dbquery("SELECT thread_id, thread_subject, thread_lastpost FROM fusion_threads ORDER BY thread_id DESC LIMIT $limit"); while ($row = mysql_fetch_array($result)) { echo "
\n"; echo 'cms '; echo(substr($row['thread_subject'],0,20)); echo "\n"; $wynik = dbquery("SELECT notify_datestamp FROM fusion_thread_notify GROUP BY notify_datestamp ORDER BY notify_datestamp LIMIT 0,30"); $data = dbarray($wynik); echo "".showdate("shortdate",$data['notify_datestamp'])."
\n"; }