表CREATE TABLE `enjoyads` (
`id` int(6) NOT NULL auto_increment,
`accountid` int(19) default NULL,
`type` char(20) default NULL,
`address` char(40) default NULL,
`description` varchar(255) default NULL,
`link` int(20) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
account/detaiview.php中
添加代码[code] $adssql = “select accountid,type,address,description,link from enjoyads”;
$adsresult = $adb->query($adssql);
$smarty->assign(“ADDRESS”,$adsresult);
smarty/template/DetailView.tpl
{foreach key=header item=detail1 from=$ADDRESS}
{foreach item=detail3 from=$detail1}
{/foreach}
{/foreach}
</table>[/code]视图:
为什么 视图出来会有2列相同的
$adb->query()
返回的是什么 没看明白
[color=Red]我做的目的 : 新建个表 关联accountid 然后有 编辑 更新 删除 的操作[/color]
{$detail3} |