<think:query sql="select id,classname from lx_newscata where fid=2">
<div>
<h3>{$query.classname}</h3>
<ul>
<think:query sql="select id,title from lx_news where type={$query.id} order by addtime desc limit 10">
<li><a href="#">{$query.title}</a></li>
</think:query>
</ul>
</div>
</think:query>如上子查询,获取不到{$query.id}的值,解析后直接输出这个变量,求解 最佳答案