从 db phalcon 检索标签
Retrieve Tags from db phalcon
我正在用 phalcon 实现一个博客。有一个标记字段,后跟:
https://github.com/mfiels/tagsly/blob/master/index.html
它向数据库中插入了多个值。但不明白如何从标签字段中检索数组值。
我想呈现所有标签列表,如果用户单击该标签,那么它应该呈现所有相关的列表 post。我的意思是在函数中我无法计算它 $tags = Blogs::find();如何使用 like 子句查找数组值?还是我错了?或者有什么简单的方法吗?请...
My db looks like this
你有没有尝试过类似的东西:
$result = Blogs::find([
'tag LIKE :tag:',
'bind' => ['tag' => $tag],
]);
我正在用 phalcon 实现一个博客。有一个标记字段,后跟: https://github.com/mfiels/tagsly/blob/master/index.html
它向数据库中插入了多个值。但不明白如何从标签字段中检索数组值。
我想呈现所有标签列表,如果用户单击该标签,那么它应该呈现所有相关的列表 post。我的意思是在函数中我无法计算它 $tags = Blogs::find();如何使用 like 子句查找数组值?还是我错了?或者有什么简单的方法吗?请...
My db looks like this
你有没有尝试过类似的东西:
$result = Blogs::find([
'tag LIKE :tag:',
'bind' => ['tag' => $tag],
]);