数据库标签解析后被注释
<stl:sqlContents connectionStringName="Server= ;Uid=root;Pwd=uppsoft@312;Database=care;SslMode=none;CharSet=utf8;" pageNum="10" cellpadding="2">
stl:queryString
SELECT TOP 6 * FROM {Stl.content_Structure} ORDER BY AddDate DESC
</stl:queryString>
<stl:sqlContent type="Depth" wordnum="5"></stl:sqlContent>
</stl:sqlContents>
数据库标签解析后被注释
这个标签是这样用吗?
看代码没错,我们查一下
如果出现注释应该是SQL语句写的不对,看看注释具体写的是什么
| stl:sqlcontents | error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6 * FROM ORDER BY AddDate DESC' at line 1 | stl: <stl:sqlContents connectionStringName="Server=47.104.82.210 ;Uid=root;Pwd=uppsoft@312;Database=care;SslMode=none;CharSet=utf8;" pageNum="10" cellpadding="2"> | stl:queryString | SELECT TOP 6 * FROM {Stl.content_Structure} ORDER BY AddDate DESC | </stl:queryString> | <stl:sqlContent type="Depth" wordnum="5"></stl:sqlContent> | </stl:sqlContents> | -->
select语句中 表名 需要有{stl.表名}吗? 还是直接写SQL 语句?
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6 * FROM ORDER BY AddDate DESC' at line 1 这里写了原因,排序字段不对导致的
已解决,谢谢