<commit_before><?php
/** chart of accounts */

class Account_model extends MY_Model {

	function get_accounts($get_as_list = FALSE){
		$this->db->from('account');
		$this->db->order_by('id');
		$this->db->select('id,name');
		$list = $this->db->get()->result();
		if($get_as_list) {
			$result = get_keyed_pairs($list, ['id', 'name'], TRUE, TRUE);
		}
		else{
			$result = $list;
		}
		return $result;
	}
function get($id){
		$this->db->from('account');
		$this->db->where('id',$id);
		return $this->db->get()->row();
}

function update($id, $name){
		$this->db->update('account', [ 'name'=>$name],'id = '. $id);
}

	function insert($id, $name){
		$this->db->insert('account',['id'=>$id, 'name'=>$name]);
		return $this->db->last_insert_id();
	}

}<commit_msg>Bug fix for inserting accounts<commit_after><?php
/** chart of accounts */

class Account_model extends MY_Model {

	function get_accounts($get_as_list = FALSE){
		$this->db->from('account');
		$this->db->order_by('id');
		$this->db->select('id,name');
		$list = $this->db->get()->result();
		if($get_as_list) {
			$result = get_keyed_pairs($list, ['id', 'name'], TRUE, TRUE);
		}
		else{
			$result = $list;
		}
		return $result;
	}
function get($id){
		$this->db->from('account');
		$this->db->where('id',$id);
		return $this->db->get()->row();
}

function update($id, $name){
		$this->db->update('account', [ 'name'=>$name],'id = '. $id);
}

	function insert($id, $name){
		$this->db->insert('account',['id'=>$id, 'name'=>$name]);
	}

}
{'fraction_non_alphanumeric': 0.2628418945963976, 'fraction_numerical': 0.0, 'mean_word_length': 4.617977528089888, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3294165', 'n_tokens_mistral': 616, 'n_tokens_neox': 573, 'n_words': 96}