#1 lixu818            
             如题,读取两个表后页面接收时如何区分两个表内容,新手刚学习sp,望高手不吝赐教!                
                        2014-06-01 00:18:26                    
         
                
            #4 lixu818            
             jake再帮找找错误:
下面是main.php中的代码:
function index(){ 
                $lable-a = spClass("lable-a"); 
                $this->results = $lable-a->spPager($this->spArgs('p',1), 10)->findAll();                $this->pager = $lable-a->spPager()->getPager();
                $this->display("tpl/index.html“);                
                $lable-b= spClass("lable-b"); 
                $this->results = $lable-b->spPager($this->spArgs('p',1), 10)->findAll();                $this->pager = $lable-b->spPager()->getPager();
                $this->display("tpl/index.html");        }
然后在index.html中做如下接收和显示:
表a内容显示
                {foreach from=$results item=lable-a}
 - {$lable-a.name}
 - {$lable-a.old}
   {/foreach}