Welcome Guest, Not a member yet? Register   Sign In
How to implement subquery
#1

How to exercise the below query in query builder?

SELECT * FROM `user` WHERE uid=1311 and Qid NOT IN (SELECT Qid FROM subm WHERE uid='1311' and Sid='5721');

I tried this,
$this->user->where('uid', '1311')->whereNotIn('Qid', $this->subm->select('Qid')->where('uid', '1311')->where('Sid','5721')->find())->find();

But it throws this,
ErrorException
Array to string conversion
Reply




Theme © iAndrew 2016 - Forum software by © MyBB