in reply to Re: Class::DBI and data split multiple tables
in thread Class::DBI and data split multiple tables
Yes exactly, it will most often be multiple tables selected from, not just one. Somtimes it will be multiple years (schemas)
>>If so, load them all up as separate Class::DBI classes and choose which one to run the search against in your CGI.
Well they'll likely be searching a range not a singular date. Find transactions from Dec 3 2006 -> jan 3 2007 where this this and this but not this. etc Off the cuff sql like:
(select date, conn_id, cust_id from 2007.jan_trans where date in ( '20 +07-1-3' ) and cust_id=3) UNION ALL (select date, conn_id, cust_id from 2006.dec_trans where date in ( '20 +06-12-3') and cust_id=3 )
So that's what I'm struggling to figure out how to do in Class::DBI. I'm trying to avoid all the normal manual sql work etc.
thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Class::DBI and data split multiple tables
by perrin (Chancellor) on Mar 20, 2007 at 21:35 UTC |