Il tuo compito sembra piuttosto semplice
invece di
->where_in('App.id',$subquery) //<-- Here is the problem
puoi provare quanto segue
->where("App.id IN (".$subquery.")",NULL, false)
Il tuo compito sembra piuttosto semplice
invece di
->where_in('App.id',$subquery) //<-- Here is the problem
puoi provare quanto segue
->where("App.id IN (".$subquery.")",NULL, false)