是否可以在wordpress的类别或页面末尾显示缺货产品?
因此,客户首先会看到可用的产品,之后会看到缺货的产品.
我有4个表,称为商店,用户,评论和评级.
我想获得相应商店的所有评论,包括评论的用户详细信息以及该商店的整体评分.
我几乎完成了单个查询.但问题是,如果商店对同一用户进行多次相同评级,则将其视为单一评级.但该评级数是正确的.
即
从该表中,user_id 3被评为shop_id 1为4次.因此计数为4,total_rating为17.
我的疑问是
select review.comments, users.username, count(distinct rating.id) as rating_count,
sum(distinct rating.rating) as total_rating from users
left join review on users.id = review.user_id and review.shop_id='1'
left join rating on users.id = rating.user_id and rating.shop_id='1'
where review.shop_id='1' or rating.shop_id='1'
group by users.id, review.user_id, rating.user_id, review.id
Run Code Online (Sandbox Code Playgroud)
当我运行此查询时,我得到了
但我需要total_rating 17 for user_id 3 ..
检查这个小提琴
我开发了Ionic 2应用程序.当我尝试将其上传到Apple商店时,他们会拒绝它,并显示以下消息:
缺少Info.plist密钥 - 此应用程序尝试在没有使用说明的情况下访问隐私敏感数据.应用程序的Info.plist必须包含一个NSPhotoLibraryUsageDescription键,其中包含一个字符串值,向用户解释应用程序如何使用此数据.
我NSPhotoLibraryUsageDescription在config.xml中添加了密钥
<plugin name="cordova-plugin-camera" spec="https://github.com/apache/cordova-plugin-camera">
<variable name="CAMERA_USAGE_DESCRIPTION" value="App would like to access the camera." />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />
</plugin>
Run Code Online (Sandbox Code Playgroud)
但他们仍然以同样的信息拒绝了应用程序.我是否需要在所有插件变量中添加此键?我的意思是我也使用了图像选择器插件.我是否还需要在此插件中添加此密钥?我已经添加了,但他们仍然拒绝同样的错误.