Merge pull request #5126 from christianbeeznest/ofaj-21390

Reporting: Refactor LP-Course query - refs BT#21390
pull/5128/head
christianbeeznest 10 months ago committed by GitHub
commit cf2aff7987
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      public/main/inc/lib/tracking.lib.php

@ -2488,15 +2488,7 @@ class Tracking
} else {
if (!empty($row['lp_id'])) {
$tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$sql = "SELECT lp.title
FROM $tbl_lp as lp, $tbl_course as c
WHERE
c.code = '$course_code' AND
lp.iid = ".$row['lp_id']." AND
lp.c_id = c.id
LIMIT 1;
";
$sql = "SELECT title FROM $tbl_lp WHERE iid = ".(int) $row['lp_id'];
$result = Database::query($sql);
$row_lp = Database::fetch_row($result);
$lp_name = null;

Loading…
Cancel
Save