Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

admin/mnet/mnet_services: Concatenated query to sidestep Moodle

requirement that firest field of resultset is unique


Author: Donal McMullan <donal@catalyst.net.nz>
  • Loading branch information...
commit 42f735391116672009dc800a463ddc7f5970c748 1 parent f509ce0
martinlanghoff authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 admin/mnet/mnet_services.php
4 admin/mnet/mnet_services.php
@@ -74,9 +74,11 @@
74 74 $id_list .= ', '.$CFG->mnet_all_hosts_id;
75 75 }
76 76
  77 + $concat = sql_concat('COALESCE(h2s.id,0) ', ' \'-\' ', ' svc.id');
  78 +
77 79 $query = "
78 80 SELECT DISTINCT
79   - h2s.id,
  81 + $concat as id,
80 82 svc.id as serviceid,
81 83 svc.name,
82 84 svc.offer,

0 comments on commit 42f7353

Please sign in to comment.
Something went wrong with that request. Please try again.