thinkphp结果集判空isEmpty
2022-07-28 14:14:58
112
{{single.collect_count}}

thinkphp结果集判空isEmpty

使用select查询多条数据结构可以得到的是结果集可以使用isEmpty判空

当使用find,get获取到的是单条,不支持isEmpty

所以多条数据用isEmpty

单挑直接empty()

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}