[错误代码]
SQLSTATE[42000]: Syntax error or access violation: 1064 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 '' at line 1
错误示范
{eyou:assign name="keywords" value="$eyou.field.keywords"}
{eyou:sql sql='Select count(*) as AllNum from __PREFIX__archives where title like '%$keywords%'' cachetime='-1'}
{$field.AllNum}
{/eyou:sql}
正确示范
{eyou:assign name="keywords" value="$eyou.field.keywords"}
{eyou:sql sql="Select count(*) as AllNum from __PREFIX__archives where title like '%$keywords%'" cachetime='-1'}
{$field.AllNum}
{/eyou:sql}
引号的引用要注意,