You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LEFT JOIN $tableUser c ON b.platform_user_id=c.user_id
460
459
WHERE a.specialty_id = $specialtyId";
461
460
$res = Database::query($sql);
462
461
while ($row = Database::fetch_assoc($res)) {
@@ -470,7 +469,7 @@ function getListSpecialtyTutorial($specialtyId)
470
469
{
471
470
global$tableSepeParticipantsSpecialtyTutorials;
472
471
$specialtyId = (int) $specialtyId;
473
-
$sql = "SELECT * FROM $tableSepeParticipantsSpecialtyTutorials
472
+
$sql = "SELECT * FROM $tableSepeParticipantsSpecialtyTutorials
474
473
WHERE participant_specialty_id = $specialtyId";
475
474
$res = Database::query($sql);
476
475
$aux = [];
@@ -489,9 +488,12 @@ function listCourseAction()
489
488
global$tableSepeActions;
490
489
global$tableSepeCourseActions;
491
490
492
-
$sql = "SELECT $tableSepeCourseActions.*, course.title AS title, $tableSepeActions.action_origin AS action_origin, $tableSepeActions.action_code AS action_code
493
-
FROM $tableSepeCourseActions, course, $tableSepeActions
494
-
WHERE $tableSepeCourseActions.course_id=course.id
491
+
$sql = "SELECT
492
+
$tableSepeCourseActions.*, course.title AS title,
493
+
$tableSepeActions.action_origin AS action_origin,
494
+
$tableSepeActions.action_code AS action_code
495
+
FROM $tableSepeCourseActions, course, $tableSepeActions
496
+
WHERE $tableSepeCourseActions.course_id=course.id
495
497
AND $tableSepeActions.id=$tableSepeCourseActions.action_id";
496
498
$res = Database::query($sql);
497
499
$aux = [];
@@ -508,7 +510,7 @@ function listCourseFree()
508
510
global$tableSepeCourseActions;
509
511
$sql = "SELECT id, title FROM $tableCourse
510
512
WHERE NOT EXISTS (
511
-
SELECT * FROM $tableSepeCourseActions
513
+
SELECT * FROM $tableSepeCourseActions
512
514
WHERE $tableCourse.id = $tableSepeCourseActions.course_id)
513
515
;";
514
516
$res = Database::query($sql);
@@ -544,8 +546,8 @@ function getSpecialtyTutorId($specialtyId, $tutorId)
544
546
$specialtyId = (int) $specialtyId;
545
547
$tutorId = (int) $tutorId;
546
548
547
-
$sql = "SELECT id
548
-
FROM $tableSepeSpecialtyTutors
549
+
$sql = "SELECT id
550
+
FROM $tableSepeSpecialtyTutors
549
551
WHERE specialty_id = $specialtyId AND tutor_id = $tutorId";
550
552
$res = Database::query($sql);
551
553
$row = Database::fetch_assoc($res);
@@ -558,7 +560,8 @@ function checkInsertNewLog($platformUserId, $actionId)
558
560
global$tableSepeLogParticipant;
559
561
$platformUserId = (int) $platformUserId;
560
562
$actionId = (int) $actionId;
561
-
$sql = "SELECT * FROM $tableSepeLogParticipant WHERE platform_user_id = $platformUserId AND action_id = $actionId";
563
+
$sql = "SELECT * FROM $tableSepeLogParticipant
564
+
WHERE platform_user_id = $platformUserId AND action_id = $actionId";
0 commit comments