{dede:sql sql="SELECT wxh,wxtx,wxewm,wxhsm,id,title FROM dede_addon17 LEFT JOIN dede_archives ON dede_archives.typeid=dede_addon17.typeid WHERE writer=~writer~ and channel=17 "}
上面的要怎么修改才正确
wxh,wxtx,wxewm,wxhsm,id需调用的字段,在dede_addon17表里,查询调用同一作者的文章,
{dede:sql sql="SELECT * FROM dede_archives WHERE writer=~writer~ and channel=17}一个表时是可以调出来。
第1个回答 2018-06-15
{dede:sql sql="SELECT * FROM #@__archives a,#@__addon17 p WHERE a.id=p.aid AND a.writer=~writer~ limit 0,8"}[field:字段名字/]{/dede:sql}
writer=~writer~可以换成mid=~mid~
writer=~writer~可以换成mid=~mid~
第2个回答 2015-08-30
{dede:sql sql="Select aid,typeid,title,writer,senddate,body From dede_mynews order by aid desc limit 0,10"}<li class='dotline'><span>[field:senddate function="MyDate('m-d',@me)"/]</span> <a href="/news.php?id=[field:aid/]">[field:title/]</a>[field:body/]</li>{/dede:sql}