⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠

set_relation_n_n with Not in


  • Please log in to reply
1 reply to this topic

#1 vhspiceros



  • Members
  • Pip
  • 4 posts

Posted 21 October 2015 - 08: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


#2 Adriano Gonçalves

Adriano Gonçalves


  • Members
  • PipPip
  • 15 posts

Posted 26 October 2015 - 08:24 AM

Hi, you can see a solution for this here: http://www.grocerycr...-with-a-filter/

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users