-------------------- -------------------- -------------------- -------

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
//-----------------------------------------------------------------------
/*
Generated by DemonGenerator
Add New
*/
public function add_new($id, $record, $link)
{
$query_string = "SELECT id, title FROM `project` WHERE id = ".(int)$id.";";
$this->CI->db->query($query_string);
$query_string = "SELECT id FROM `project` WHERE id = ".(int)$id.";";
$this->CI->db->query($query_string);
$this->CI->db->insert('project', $record);
$this->CI->db->update('project', $record, 'id = '.(int)$id.'');
$this->CI->db->update('project', $record, 'link = \''.$this->CI->db->escape_str($link).'\'');
$this->CI->db->where('id', $id);
$this->CI->db->where('record', $record);
$this->CI->db->limit((int)$id, 10);
$query_result = $this->CI->db->get('tablename');
$return_result = $query_result->result();
return $return_result;
}