Ticket #670 (closed Feature Request: duplicate)
subqueries with db builder
| Reported by: | Nodren | Owned by: | zombor |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.2 |
| Component: | Libraries:Database | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
i think the db builder is great, and especially with the rewrite it can be a whole lot better.
i'm thinking the value of a in, where, etc functions can be a db builder query itself... to allow for sub queries
an example, expressing this query:
select * from table 1 where id in ( select table1_id from table2 where something = 'yes' )
would be expressed
$db->from('table1')->in($db->select('table1_id')->from('table2')->where(array('something'=>'yes')))
just an idea.
Change History
Note: See
TracTickets for help on using
tickets.
