Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100726978
getAnnotationValues.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 2, 06:01
Size
711 B
Mime Type
text/x-php
Expires
Tue, Feb 4, 06:01 (2 d)
Engine
blob
Format
Raw Data
Handle
24019227
Attached To
R4897 i2b2-webclient
getAnnotationValues.php
View Options
<?php
$conn
=
pg_connect
(
"host=localhost port=5432 dbname=i2b2 user=shrine_ont password=demouser"
);
if
(!
$conn
)
{
echo
"Error while connecting to the postgres database"
;
exit
;
}
// get the row which contains all the values of the passed annotation
$query
=
"SELECT annotation_values FROM shrine_ont.genomic_annotations_metadata WHERE annotation_id='"
.
$_GET
[
"annotation_name"
]
.
"'"
;
$result
=
pg_query
(
$conn
,
$query
);
if
(!
$result
)
{
echo
"An error occurred.
\n
"
;
exit
;
}
// just tell to which annotation these values correspond (in case of concurrent requests there may be inconsistencies)
echo
$_GET
[
"annotation_name"
]
.
"$%$"
;
while
(
$row
=
pg_fetch_row
(
$result
))
{
echo
"$row[0]"
;
}
Event Timeline
Log In to Comment