|
楼主 |
发表于 2005-9-13 17:16:04
|
显示全部楼层
没人看,晕啊,大家都不用DBA写程序的吗?
BDA和Smarty结合写程序真的很痛快....
[PHP]
........
$sql = "select * from foo";
$rs =& $DB->execute($sql) or die($DB->errormsg());
$smarty->assign("rows", $rs->getRows());
$smarty->display("example.htm");
........
[/PHP]
[HTML]
example.htm
....
{foreach from=$rows item=row}
{$row.name}.............
{/foreachelse}
not found
{/foreach}
......
[/HTML] |
|