我在图片系统加了一个字段ks_sjs,现在在图片内容页要调用该设计师发布的图片,要怎么表达,如果直接用名字能调到
select ID,Tid,Title,PhotoUrl,KS_sjs from KS_Photo where KS_sjs='俞文文' order by id desc
KS_sjs='俞文文'这样能得到数据 但通用就不会表达,请高手赐教!
select ID,Tid,Title,PhotoUrl,KS_sjs from KS_Photo where KS_sjs='(select top 1 KS_sjs from KS_Photo where ID={$CurrInfoID} order by id desc)' order by id desc
{=Execute(“Select top 1 articlecontent from ks_article where id=1”)} 将在模板里输出文章ID号为1的文章内容
改用,
select ID,Tid,Title,PhotoUrl,KS_sjs from KS_Photo where KS_sjs='{=Execute(“Select top 1 KS_sjs from KS_Photo where ID={$CurrInfoID}”)}' order by id desc