Initial import
This commit is contained in:
32
application/controllers/tools/mcu/Test.php
Normal file
32
application/controllers/tools/mcu/Test.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
class Test {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("onedev", true);
|
||||
}
|
||||
function do() {
|
||||
$sql = "select * from mcu_screening_test
|
||||
where McuScreeningTestIsActive = 'Y' and Mcu_ScreeningTestIsExport='V'
|
||||
order by Mcu_ScreeningT_OrderHeaderID, Mcu_ScreeningT_SampleTypeID";
|
||||
$qry = $this->db->query($sql);
|
||||
if($qry) {
|
||||
$rows = $qry->result_array();
|
||||
$param = array();
|
||||
$prevID = 0;
|
||||
foreach($rows as $r) {
|
||||
$curID = $r["Mcu_ScreeningT_OrderHeaderID"];
|
||||
if ( $prevID != $curID ) {
|
||||
$param[$curID] = array();
|
||||
}
|
||||
$param[$curID][] = array(
|
||||
"sampleTypeID" => $r["McuScre
|
||||
$prevID = $curID;
|
||||
}
|
||||
} else {
|
||||
echo "ERR :";
|
||||
print_r($this->db->error());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user