<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>How to display sql query?

[ad_1]

Replies: 2

Hello

How do I get the output of the following query displayed in wp data access – assuming it is correct. I confess I have not examined this closely.

SELECT
u.ID AS user_id,
u.user_login AS username,
c.post_title AS course_name,
q.post_title AS quiz_name,
a.activity_started AS start_time,
a.activity_completed AS end_time,
m.activity_meta_value AS score
FROM
wp_users u
INNER JOIN wp_learndash_user_activity a ON u.ID = a.user_id
INNER JOIN wp_posts c ON a.course_id = c.ID
INNER JOIN wp_posts q ON a.post_id = q.ID
INNER JOIN wp_learndash_user_activity_meta m ON a.activity_id = m.activity_id
WHERE
a.activity_type = ‘quiz’ AND m.activity_meta_key = ‘grade’

I assume I have to go into data explorer – somebody suggested I need a project but how to do that? I am super rusty with wp data access…

Thank you so much for your help.

  • This topic was modified 2 hours, 45 minutes ago by mlapl1.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer