select ks_u_jiaoan.id,ks_u_jiaoan.title,ks_u_jiaoan.adddate,KS_Class.id from ks_u_jiaoan left join KS_Class on ks_u_jiaoan.tid=KS_Class.id where ks_u_jiaoan.tid in(Select ID From KS_Class Where TS LIKE '%{$Param(0)}%') order by ks_u_jiaoan.id desc
这样基本就搞定了 我还是发出来供需要的朋友参考吧 只是觉得如果能得到官方的帮助也许这个功能会更好
现在有个问题就是因为我要在每2行栏目后加入一个广告,为了满足最多栏目的需要,我制作的表格就比较多,但在栏目较少的地方。哪些多出来的表格还是显示出来了,怎么才能实现自动呢,栏目循环的代码如下
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table3">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table4" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table6">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table8" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table7" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table9" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table10">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table11" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table12" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table13">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table14" height="10">
<tr>
<td></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=60 src="/Template/教育资源/images/08_g2.jpg"
width=640></TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table71" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table15" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table16" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table17">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table18" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table19" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table20">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table21" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table22" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table23" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table24">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table25" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table26" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table27">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table28" height="10">
<tr>
<td></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=60 src="/Template/教育资源/images/08_g2.jpg"
width=640></TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table72" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table29" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table30" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table31">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table32" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table33" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table34">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table35" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table36" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table37" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table38">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table39" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table40" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table41">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table42" height="10">
<tr>
<td></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=60 src="/Template/教育资源/images/08_g2.jpg"
width=640></TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table73" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table43" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table44" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table45">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table46" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table47" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table48">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table49" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table50" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table51" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table52">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table53" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table54" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table55">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table56" height="10">
<tr>
<td></td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 align=center border=0>
<TBODY>
<TR>
<TD>6666</TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table74" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table57" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table58" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table59">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table60" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table61" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table62">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table63" height="10">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top"><table border="1" width="100%" id="table64" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table65" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table66">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
<td width="10" valign="top"> </td>
<td width="315" valign="top"><table border="1" width="100%" id="table67" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#AEDEF2" height="58">
[loop=1]
<tr>
<td valign="top" height="58"><table border="0" width="100%" id="table68" cellspacing="0" cellpadding="0" background="/images/bg_11.gif" height="28">
<tr>
<td> <a href="{$Field(id,GetInfoUrl,100,1)}"><strong>{$Field(foldername,Text,0,...,0,)}</strong></a></td>
</tr>
</table>
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" id="table69">
<tr>
<td>{SQL_222({$Field(id,Text,0,...,0,)})} </td>
</tr>
</table></td>
</tr>
[/loop]
</table></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table70" height="10">
<tr>
<td></td>
</tr>
</table>