Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Farooq committed Aug 15, 2017
1 parent e4ff01c commit 876d2c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -11,9 +11,9 @@ CREATE PROCEDURE addConferenceDetailRecord( IN in_sid VARCHAR(34),
IN in_master_ms_id VARCHAR(34),
IN master_present BOOLEAN )
BEGIN
IF EXISTS(SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND status LIKE 'RUNNING%')
IF EXISTS(SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND account_sid=in_account_sid AND status LIKE 'RUNNING%')
THEN
SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND status LIKE 'RUNNING%';
SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND account_sid=in_account_sid AND status LIKE 'RUNNING%';
ELSE
INSERT INTO restcomm_conference_detail_records (sid, date_created, date_updated, account_sid, status, friendly_name, api_version, uri, master_ms_id, master_present) VALUES (in_sid, in_date_created, in_date_updated, in_account_sid, in_status, in_friendly_name, in_api_version, in_uri, in_master_ms_id, master_present);

Expand Down
Expand Up @@ -441,9 +441,9 @@ CREATE PROCEDURE addConferenceDetailRecord( IN in_sid VARCHAR(34),
IN in_master_ms_id VARCHAR(34),
IN master_present BOOLEAN )
BEGIN
IF EXISTS(SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND status LIKE 'RUNNING%')
IF EXISTS(SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND account_sid=in_account_sid AND status LIKE 'RUNNING%')
THEN
SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND status LIKE 'RUNNING%';
SELECT * FROM restcomm_conference_detail_records WHERE friendly_name=in_friendly_name AND account_sid=in_account_sid AND status LIKE 'RUNNING%';
ELSE
INSERT INTO restcomm_conference_detail_records (sid, date_created, date_updated, account_sid, status, friendly_name, api_version, uri, master_ms_id, master_present) VALUES (in_sid, in_date_created, in_date_updated, in_account_sid, in_status, in_friendly_name, in_api_version, in_uri, in_master_ms_id, master_present);

Expand Down

0 comments on commit 876d2c2

Please sign in to comment.