cms icon indicating copy to clipboard operation
cms copied to clipboard

数据库标签解析后被注释

Open XuXinABC opened this issue 8 years ago • 7 comments

<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>

数据库标签解析后被注释

XuXinABC avatar May 30 '18 03:05 XuXinABC

这个标签是这样用吗?

XuXinABC avatar May 30 '18 03:05 XuXinABC

看代码没错,我们查一下

starlying avatar May 30 '18 04:05 starlying

如果出现注释应该是SQL语句写的不对,看看注释具体写的是什么

starlying avatar May 30 '18 04:05 starlying

  | 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>   | -->

XuXinABC avatar May 30 '18 04:05 XuXinABC

select语句中 表名 需要有{stl.表名}吗? 还是直接写SQL 语句?

XuXinABC avatar May 30 '18 04:05 XuXinABC

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 这里写了原因,排序字段不对导致的

starlying avatar May 30 '18 07:05 starlying

已解决,谢谢

XuXinABC avatar May 31 '18 02:05 XuXinABC