Thread: New template
View Single Post
  #4  
Old 04-14-2003, 08:42 AM
 
maniac maniac is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 97
 

Default

OK,

I've moved much further along. The query is being executed and bringing back the resutls I want (I echoed them from the query and they showed up on my page), However, they are not displaying in the template file I have created. Right now I have this is my template file:

{section name=news loop=$newsItems}
Title: {$newsItems.title}

{/section}

this is my php file:

<?
$dbCon=mysql_connect("host","user","pass") or die("Could not connect to the database");
mysql_select_db($dBName,$dbCon);

$SQLCon="SELECT title,ID,description,category,date FROM articles WHERE visible = 1 AND date<=NOW() AND category<>10 ORDER BY date DESC, ID DESC LIMIT 7 ";
$newsItems=mysql_query($SQLCon);

//while ($rs=mysql_fetch_array($newsItems))
// {
// echo "$rs[title] | $rs[date]
\n";
// echo "$rs[description]\n";
// echo "

\n";
// }

$smarty->assign("newsItems",$newsItems);

?>


Thanks again...
Reply With Quote