2016-11-30 90 views

回答

1
$tbl1Data = array(
    'id'   => '', 
    'content' => 'Hi, content will be here', 
    'time' => date("H:i:s"), 
    'date' => date("Y-m-d"), 
    'category'  => 'Electronics' 
); 
$this->db->insert('tbl1',$postData); 
$recordId $this->db->insert_id(); 

$tbl2Data = array(
    'id' => '', 
    'tbl1_id' => $recordId, 
    'category_detail' => "alskjdflkajsdlk falsjdflka lsdkfj as", 
); 
$this->db->insert('tbl1',$postData); 
相關問題