Hello
i need help for my project
for example, i use database examples by GC
in table film, i add column "actor" where it's not available in database and i create column just for display data.
$crud->columns('title','release_year','rental_duration','rental_rate','length','replacement_cost','rating','last_update','category','actor');
i want display data from table film_actor and get actor_id where film.film_id=film_actor.film_id
my code :
$crud = new grocery_CRUD(); ... $crud->callback_column('actor',array($this,'_cb_actor')); ... $this->_example_output($output); function _cb_actor($value, $row) { $actrs=$this->db->get('film_actor')->row()->actor_id; return $actrs; }
but the result is display all data with the first row actor_id in table film_actor and all data is same
i want get actor_id where film.film_id=film_actor.film_id
how can i do that?
please help me, sorry for bad english
thanks in advance