How to call Average Rating in Seblod?

More
10 years 1 month ago #1255 by claudio Fernandes
Hi, I am building a directory with Seblod and vReview is working well in full article view by calling the module.
Now I need to show average ratings for each article in the listings search. Seblod provides field plugins that allow me to add SQL or PHP code. I've tried this SQL query but it's not working.

SELECT AVG(rating) FROM #__vreview_review as t1 WHERE t1.xml = [pk]

Can you help?
Regards
Anjo

Please Log in to join the conversation.

More
10 years 1 month ago #1258 by Daniel
Hi Claudio,
xml column in database table #__vreview_review is varchar which stores multiple parameters in JSON format. So you need to write your query accordingly. If you want us to assist you in the Job, Please contact our Sales team at sales@wdmtech.com.

Thanks
Daniel

Please Log in to join the conversation.

Cron Job Starts