Hi there
have an problem creating a webtemplate including informations like this:
First i have this QUERY to find out the Threadid wich i can use in TABLE "Post" toi get the "postid" to get in the end the "attachmend_id" i can use to show up images
PHP Code:
$newsquery=$DB_site->query("SELECT threadid,title,replycount,postusername,postuserid,iconid,dateline FROM thread WHERE forumid='$newsforum' ORDER BY dateline DESC LIMIT $newsposts");
while ($news=$DB_site->fetch_array($newsquery)) {
$newsthreadid=$news[threadid];
$newstitle=$news[title];
$newsicon=$news[iconid];
$newstime=vbdate($timeformat,$news[dateline]);
$newsdate=vbdate($dateformat,$news[dateline]);
$newsusername=$news[postusername];
$newsuserid=$news[postuserid];
$comments=$news[replycount];
So now i get the postid to search for to create an image with when one is attachend to a post (ex: attachment.php?s=$session[sessionhash]&postid=$postid)
PHP Code:
$getnews=$DB_site->query_first("SELECT postid,pagetext,iconid FROM post WHERE threadid='$newsthreadid' ORDER BY postid ASC LIMIT 1");
$postid=$getnews[postid];
this are two queries to get an image out of a post a user makes

but how it seems with the webtemplates i can do only one query.. i dont know how to migrate this code into the qebqueries ?
please help me someone out with this.. i tried now for several days and did not manage this .. anyway i just need to show it up..
an working example with a *.php page i did here:
www.spielplanet2.de/news.php <- on the left site you see this code working.. and this option i just need to migrate into webtemplates..so i can turn off this news page and use webtemplates 100% for everything ..
Example of an early Alpha Layout of exisitng Webtemplates:
http://spielplanet2.de/forums/view.p...lpha_news_v0_2