2
所以我有这样的语句来抓取所有帖子MySQL存储功能和PHP
select id, title
from posts
where type = 'article'
和我有一个存储函数计算总的意见,并返回结果
我知道我可以执行它像
select totalView(id)
,但我怎么能合并这两个查询与每个总视图退回所有帖子发布
可能类似于
select id, title, totalView(id) as total
from posts
where type = 'article'
谢谢。
请出示TotalView的功能 – Aris
你给** **是回答你问的问题的例子。 – symcbean