Initial import

This commit is contained in:
sas.fajri
2026-05-25 20:01:37 +07:00
commit 710d7c1b97
10371 changed files with 2381698 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
class Nat_to_test extends MY_Controller
{
var $db_smartone;
function __construct()
{
parent::__construct();
$this->db_smartone = $this->load->database('onedev');
}
function generate()
{
// truncate
$this->db_smartone->query("TRUNCATE");
$parents =
$this->db_smartone->select("DISTINCT(Nat_RelationParentID) parentid", false)
->join('nat_test', 'Nat_RelationParentID = Nat_TestID')
->where("Nat_RelationIsActive", "Y")
->order_by('Nat_TestSequence')
->get('nat_relation')
->result_array();
foreach ($parents as $k => $v)
{
// INSERT top parent
$this->db_smartone->query("");
$parent_1 =
$this->db_smartone->select()
->join('nat_test', 'Nat_RelationParentID = Nat_TestID')
->where('Nat_RelationParentID', $v['parentid'])
->where('Nat_RelationIsActive', "Y")
->order_by('Nat_TestSequence')
->get('nat_relation')
->result_array();
}
}
}
?>