Hi,
I am new to adodb & smarty. I have done a page but end up with a blank page no error display on the page. Any idea?
template file
<html>
<body>
<table cellpadding=1 cellspacing=0 border=0 width=100%>
{section name=nr loop=$results}
<tr>
<td>{$results[nr].projectdescription}</td>
</tr>
{/section}
</table>
</body>
</html>
php file
<?php
require_once("./config.php");
$db = NewADOConnection("$database_type");
$db->pConnect("$host", "$user", "$password", "$database") or die("Unable to connect!");
$query = "SELECT * from view_device_quantity";
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$rs = $db->Execute($query) or die("Error in query: $query. " . $db->ErrorMsg());
while ($row = $rs->FetchNextObject())
{ $results = array (
'projectdescrption' => $row->projectdescription,
'server' => $row->server,
'firewall' => $row->firewall,
'storage' => $row->storage,
'router' => $row->router,
'switch' => $row->switch);
}
$db->Close();
$smarty->assign('results', $results);
$smarty->display('stat.tpl');
?>