How to display sql query?
-
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.
- The topic ‘How to display sql query?’ is closed to new replies.