Help improve following querry

Help improve following querry

av Nadirshah Ferozepurwalla -
Antal svar: 0

I want all logs of created and restored courses by a particular user. Managed to write a successful query but please help me in optimizing it by efficient joints or something.

Also can any one show the way to include the course URL beneath the course name, that is clicking on course name redirects to the course?

Thankyou

Code:


SELECT `prefix_course`.`fullname`, `prefix_course`.`shortname`, `prefix_logstore_standard_log`.*
FROM `prefix_logstore_standard_log`
JOIN `prefix_course` ON `prefix_course`.`id` = `prefix_logstore_standard_log`.`courseid`
WHERE `prefix_logstore_standard_log`.`userid` = XXXX AND (`prefix_logstore_standard_log`.`action` = 'created' OR `prefix_logstore_standard_log`.`action` = 'restored') AND `prefix_logstore_standard_log`.`target` = 'course'



Medeltalet av utvärderingarna: -