Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function history($ccod) {
  2. $this->db->select('dat, cliente, texto, comcod, cnome, username');
  3. $this->db->where('cliente', $ccod);
  4. $this->db->from('comentarios');
  5. $this->db->join('clientes', 'clientes.ccod = comentarios.cliente');
  6. $this->db->join('users', 'users.id = comentarios.autor');
  7. $query = $this->db->get();
  8. return $query->result();
  9. }
  10.  
  11. function inserir_coment($data) {
  12. return $this->db->insert('comentarios', $data, "autor.comentarios = user.id");
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement