我一直在尝试基于 Sazans 库实现多语言支持,但查询似乎对我不起作用。
库:https ://github.com/sazan/MultiLang-Library-for-PyroCMS/blob/master/README
我的错误:
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 'FROM (`default_navigation_links`) WHERE `navigation_group_id` = '1' ORDER BY `p' at line 2
SELECT *, translate("navigation", `id`, `"title"`, `"en"`, `title)` AS title FROM (`default_navigation_links`) WHERE `navigation_group_id` = '1' ORDER BY `position`
该错误正在引发查询。我相信函数 translate 没有定义,这就是它抛出错误的原因。
The query: $this->db ->select('*, translate("navigation", id, "title", "'.CURRENT_LANGUAGE.'", title) AS title');
我尝试通过 phpmyadmin 在我的数据库上运行功能设置查询(在项目页面中找到)。当我添加它时 - 它没有返回错误,也没有“告诉我”它成功添加了函数。
知道我该怎么做吗?