Function codeigniter with sql

-1

I have a function called tires in the codeigniter model

And in the same model I have another function that I need to call the tire function code

Can anyone tell me how I do this here an example of what I want to do ...

$this->db->where('xcod1 = ', $this->pneus->cod);

    
asked by anonymous 17.11.2016 / 13:50

1 answer

0
The CI model is only for communication with DB , who manage and call the functions are controller strong>

Well in this function:

$this->db->where('xcod1 = ', $this->pneus->cod);

The correct would be, without the sign of "=" thus:

$this->db->where('xcod1', $this->pneus->cod);

But where does the tire object come from, I believe you are there!

    
17.11.2016 / 14:29