Commit 15fcb675 authored by User expired's avatar User expired
Browse files

change in function get_tcexam_group_appointment_users

parent 15334f75
......@@ -130,34 +130,43 @@ ALTER FUNCTION get_tcexam_group_appointment_users(character varying, character v
OWNER TO postgres;
-- get_tcexam_group_users
CREATE OR REPLACE FUNCTION get_tcexam_group_users(group_id character varying)
-- Function: get_tcexam_group_appointment_users(character varying, character varying)
CREATE OR REPLACE FUNCTION get_tcexam_group_appointment_users(pgroupid character varying, pappointmentid character varying)
RETURNS text AS
$BODY$
DECLARE
xoutput text;
BEGIN
SELECT XMLSERIALIZE ( CONTENT
XMLELEMENT(name "userVOes",
xmlagg(
XMLELEMENT(name "userVO",
XMLFOREST(user_id),
XMLFOREST(user_name as login),
XMLFOREST(user_name as login),
XMLFOREST(user_email),
XMLFOREST(user_firstname),
XMLFOREST(user_lastname),
XMLFOREST(user_level)
))) as text )
INTO xoutput
FROM (SELECT * FROM (
SELECT * FROM tce_user_groups g
LEFT JOIN tce_usrgroups ug ON g.group_id = ug.usrgrp_group_id) ug
LEFT JOIN tce_users u ON u.user_id = ug.usrgrp_user_id) u
WHERE u.external_id LIKE concat($1,':%')
;
RETURN xoutput;
END;
$BODY$
LANGUAGE sql VOLATILE
COST 1;
LANGUAGE plpgsql VOLATILE
COST 1;
ALTER FUNCTION get_tcexam_group_appointment_users(character varying, character varying)
OWNER TO postgres;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment