网站优化

网站优化

Products

当前位置:首页 > 网站优化 >

表行SQL中的WordPress计数值

GG网络技术分享 2025-03-18 16:12 1


问题描述:

I have a WordPress data table as an image. My user rating is (max 5*).

enter image description here

(In my data I have 2 rating 5* for postid = 1 / 1 rating 4* for postid = 1). How do I echo number rating 5* for postid = 1 (is 2)? Similar for rating 4* / 3*...1*.

Any ideas? Thanks.

图片转代码服务由CSDN问答提供

感谢您的意见,我们尽快改进~

功能建议

我有一个WordPress数据表作为图像。 我的用户评分是(最多5 *)。</ p>

< img src =“https://i.stack.imgur.com/4yQQJ.jpg”alt =“在此输入图像说明”> </ p>

(在我的数据中我有 2评级5 *表示postid = 1/1评级4 *表示postid = 1)。 如何为postid = 1(是2)回显数字等级5 *? 类似于评级4 * / 3 * ... 1 *。</ p>

任何想法? 谢谢。</ p>

</ div>

网友观点:

Your SQL statement could be \\\"SELECT count(id) FROM table WHERE postid = 1 AND rating = 5\\\"

标签:

提交需求或反馈

Demand feedback