pixie
pixie copied to clipboard
SubQueries in where() not working properly
I would like to do something like this:
$query = QB::table('my_table2')->select('id')
->where('table_id', QB::subQuery($subQuery)))
It produces good working code with rawSql() but don't work itself.
To fix this problem I need to do workaround like this:
$query = QB::table('my_table2')->select('id')
->where(QB::raw('table_id = ' . QB::subQuery($subQuery)))
I wanted to but I couldn't reproduce your case. I checked and in my opinion it works.
Could you give us all query?
[Pixie v2.0, Mysql]