我想渲染一个链接,如:
<a ui-sref="myState({myKey: 'my variable type value'})">
其中state name myState和key myKey是变量.
有没有办法实现这个目标?
有什么方法可以使用 Postgres 对不同的复合 PK 进行计数?我收到以下错误,不知道为什么。
SQL: SQLSTATE[42883]: Undefined function: 7 ERROR: function count(character varying, integer) does not exist LINE 1: SELECT COUNT(DISTINCT "t".id, "t".library_id) FROM "ab_colle... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Run Code Online (Sandbox Code Playgroud)
任何帮助或建议表示赞赏。
编辑:
查询:
SELECT COUNT(DISTINCT "t".id, "t".library_id)
FROM "ab_collection" "t"
WHERE t.library_id=1
Run Code Online (Sandbox Code Playgroud)
编辑:
我还应该注意,它是一个生成此代码的核心框架 (Yii) 方法,我无法编辑它,但在尝试找到解决方法之前,我需要确定我是否做错了什么。