⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_relation_n_n with Not in



vhspiceros

vhspiceros
  • profile picture
  • Member

Posted 21 October 2015 - 20:15 PM

Hi all, 

 

I am working with GC some time ago, It's wonderful ;).
 
I have one relation n to n, and it's working fine but I need filter with not in . please see the code below
 
$crud ->set_relation_n_n('Productos', 'donaciones_productos', 'productos', 'donaciones_id', 'productos_id', '{nombre}({serie})','id',array('id_estado'=>5,'activo'=>1));

 

but i need include other filter with sentence "not in" . Some similar to 

$this->db->where ('productos.id not in (select productos_id from donaciones_productos)');

I hope you can help me, and thanks for your time and help

 

Thanks in advance

 


Adriano Gonçalves

Adriano Gonçalves
  • profile picture
  • Member

Posted 26 October 2015 - 08:24 AM

Hi, you can see a solution for this here: /topic/1822-set-relation-n-n-with-a-filter/