Skip to content

Commit b506a66

Browse files
committed
remove explicit database name redcap
1 parent 43090f3 commit b506a66

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Randapi.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function randomizeRecord(string $recordId,int $projectId,array $fields=array(),s
7474

7575
// $aid is a method result
7676

77-
$query = "select target_field from redcap.redcap_randomization_allocation rra where rra.aid = $aid";
77+
$query = "select target_field from redcap_randomization_allocation rra where rra.aid = $aid";
7878

7979
$randomizationQueryResult = $this->query($query);
8080
$randomizationResult = null;
@@ -101,10 +101,10 @@ function randomizeRecord(string $recordId,int $projectId,array $fields=array(),s
101101
$arm_name = db_real_escape_string($arm_name);
102102

103103
$query = "
104-
insert into redcap.redcap_data(project_id, event_id, record, field_name, `value`)
104+
insert into redcap_data(project_id, event_id, record, field_name, `value`)
105105
select $projectId as project_id, md.event_id, '$recordId' as record, '$resultFieldName' as field_name, '$randomizationResult' as `value`
106-
from redcap.redcap_events_arms a
107-
join redcap.redcap_events_metadata md on
106+
from redcap_events_arms a
107+
join redcap_events_metadata md on
108108
a.arm_id = md.arm_id and
109109
md.descrip = '$event_name'
110110
where a.project_id = $projectId and
@@ -140,7 +140,7 @@ public function addRecordsToAllocationTable(int $projectId,int $project_status,a
140140

141141
// $projectId is typed in method signature
142142

143-
$ridQuery = "select rid from redcap.redcap_randomization where project_id = $projectId";
143+
$ridQuery = "select rid from redcap_randomization where project_id = $projectId";
144144
$rid = false;
145145
try{
146146
if($ridQueryResult = $this->query($ridQuery)){

0 commit comments

Comments
 (0)