1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <?php
$order = $_POST['orderby'];
$query1 = 'select , s.study_key "study_key" ,s.study_num "study_num" ,s.protocol_num "protocol_num" ,s.other_num "OtherID" ,st.study_type "study_type" ,\'?\' "ProductLicense" ,decode(s.unblind_ok,1,\'Yes\',\'No\') "EligibleUnblinding" ,decode(s.encoding,1,\'Yes\',\'No\') "StudySpecificAutoEnc" ,s.study_desc "study_desc" ,ac.cond_name "InvestigatorAlert" ,s.blind_name "blind_name" ,d1.name "Drugs" ,d2.name "Indications" ,d3.name "EventTerms" ,decode(s.event_no_manual,1,\'Yes\',\'No\') "PreventManual" ,decode(s.event_closure,1,\'Yes\',\'No\') "RequireEvent" from lm_studies s ,lm_study_types st ,cfg_adv_cond ac ,cfg_dictionaries d1 ,cfg_dictionaries d2 ,cfg_dictionaries d3 where s.study_type_id = st.study_type_id and s.alert_ac_id = ac.ac_id (+)and s.deleted is null and st.deleted is null and ac.deleted is null and d1.deleted is null and d2.deleted is null and d3.deleted is null and s.drug_dict= d1.dict_id (+) and d1.usage (+) = 1 and s.event_dict = d2.dict_id (+) and d2.usage (+) = 3 and s.indications_dict = d3.dict_id (+) and d3.usage (+) = 2 order by ';
$query2=$query1.$order;
echo '
<html>
<body>';
echo $query2 ;
echo '<p>';
$long =strlen($query2);
for($i=0; $i<$long ;$i++)
{
if($query2[$i] == '"')
{
$query.='\"';
}
else
{
$query.=$query2[$i];
}
}
echo '<p> Use this querie? <form method="post" action="essai2.php4">
<input type="hidden" value ="'.$query.'" name ="query">
<input type=submit value="ok" name="send">
</form>
</body>
</HTML>'; |
Partager