{dede:sql}标签中,取出字段后,对字段进行逻辑操作时的嵌套方法

<div>{dede:sql sql='select body from dede_addonarticle where typeid=4  order by rand() LIMIT 1'}
            [field:body runphp='yes']
                $pattern='/key=(.*?)"/';
                $arr = preg_match($pattern, @me,$mc);
                $str = $mc[1];
                @me = '<iframe width="700" height="400" src="'.$str.'" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no" 
          allowfullscreen
="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>'; [/field:body] {/dede:sql}</div>

 

posted @ 2019-01-06 09:08  稀米水儿  阅读(528)  评论(0编辑  收藏  举报