thinkPHP HTML输出多条查询结果
控制端
$select=m('baojiao')->query("select * from think_baojiao where company='$comname'");
if(!empty($select)){
$this->assign('inf',$select);//assign_display连用
$this->display("showbjck");}
assign获取select数据集,display展示
视图html端
<volist name="inf" id="list">
<tr>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:110px;" value={$list.company}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:110px;" value={$list.writename}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:110px;" value={$list.writetime}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:110px;" value={$list.proname}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:110px;" value={$list.proprice}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:660px;" value={$list.proinfo}></td>
<td><input type="text" readonly="readonly" name="utel" size="25" style="font-size:12px;text-align:center;width:550px;" value={$list.addinfo}></td>
<!--绝对路径<td><img alt="" src="http://localhost:8080/mytp/2/image/logo.png" width="20" height="20"/></td>-->
<!-- 绝对路径,相对路径-->
<td><img alt="" src="../../../image/logo.png" width="20" height="20"/></td>
</tr>
</volist>