欢迎来到素材无忧网,按 + 收藏我们
登录 注册 退出 找回密码

织梦转易优不支持sql的临时解决方法

时间: 2024-02-25 09:46 阅读: 作者:素材无忧网

先升级到较新版,下载以下补丁包,然后解压覆盖到网站根目录下。下载,支持sql标签的补丁包

下面我们将织梦和易优的sql标签进行对比转换,大家在学习时留意两个系统语法的相似之处。

注意事项:

1、示例中 __PREFIX__ 代表数据表的前缀,假设你安装网站时数据表前缀是ey_,那么 __PREFIX__arctype 就是 ey_arctype

——————————- 示例1 —————————-

织梦:调用指定栏目的封面页内容,比如栏目ID是1 {dede:sql sql="select content from dede_arctype where id=1"} [field:content function=cn_substr(Html2Text(@me),600)/] {/dede:sql}

易优:指定栏目的封面页内容,比如栏目ID是1,在易优这边只有单页模型的栏目才有封面页内容 {eyou:sql sql='select content from `__PREFIX__single_content` where typeid = 1' id='field'} {$field.content|html_msubstr=###,0,300,true} {/eyou:sql} 或者 {eyou:type typeid='1' addfields='content' id='field'} {$field.content|html_msubstr=###,0,300,true} {/eyou:type}

——————————- 示例2 —————————-

织梦:调用指定栏目的数据,比如栏目ID是1 {dede:sql sql="select * from dede_arctype where id=1"}

栏目ID:[field:id/]

栏目名称:[field:typename/]

栏目链接:[field:typelink/] {/dede:sql}

易优:调用指定栏目的数据,比如栏目ID是1 {eyou:sql sql='select * from '__PREFIX__arctype' where id = 1' id='field'}

栏目ID:{$field.id}

栏目名称:{field:typename}

栏目链接:{field:typeurl} {/eyou:sql} 或者 {eyou:type typeid='1' id='field'}

栏目ID:{$field.id}

栏目名称:{field:typename}

栏目链接:{field:typeurl} {/eyou:type

版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

转载请注明: 织梦转易优不支持sql的临时解决方法

标签: 织梦转易优  
相关文章
推荐文章
模板推荐