Im trying to do a subquery with
$this->db->where(" EXISTS (SELECT * FROM myTable)");
But it doesnt work, the output of this is: myquery + WHERE 'EXISTS (SELECT * FROM myTable);
That quote before the EXISTS makes the query unresolvable!
Does anyone knows how to solve it?
Thanks!
please remove space before and after EXISTS keyword.that does not display any error.
Just try this.
Instead of using 'where' clause, please write down the complete query string & execute the query using $this->db->query();
Maybe you could try to set the escape to false by using
This is the snippet of where() in DB_active_rec.php