Codeigniter model to improve the interaction with the database