Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112239353
just_a_check.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
Fri, May 9, 05:43
Size
727 B
Mime Type
text/x-php
Expires
Sun, May 11, 05:43 (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
26020465
Attached To
R4897 i2b2-webclient
just_a_check.php
View Options
<?php
//$conn = pg_connect("host=localhost port=5432 dbname=i2b2 user=postgres password=admin");
$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
;
}
$query
=
"SELECT variant_annotations
FROM shrine_ont.genomic_annotations
WHERE variant_id = -8935125523235860480"
;
$result
=
pg_query
(
$conn
,
$query
);
if
(!
$result
)
{
echo
"An error occurred.
\n
"
;
exit
;
}
// In json format return the list of genes
$geneList
=
""
;
while
(
$row
=
pg_fetch_row
(
$result
))
{
$geneList
.=
"
\"
$row[0]
\"
,"
;
}
// drop the last comma and concatenate in json format
echo
"["
.
substr
(
$geneList
,
0
,
-
1
)
.
"]"
;
Event Timeline
Log In to Comment