织梦 使用sql语句获取内容

阅读更多
{dede:global runphp="yes"} 
    global $dsql; 
    $row=$dsql->getOne("select body from dede_addonarticle where aid=1417"); 
    @me=$row["body"]; 
{/dede:global}    

 

{dede:global runphp="yes"} 
    global $dsql; 
    $row=$dsql->getOne("SELECT body FROM dede_addonarticle WHERE aid IN (SELECT id FROM dede_archives WHERE FIND_IN_SET('h',flag) AND typeid=50 ORDER BY pubdate DESC)"); 
    @me=$row["body"]; 
{/dede:global}    

 

你可能感兴趣的:(织梦,织梦进阶,sql语句)