Re: [CDBI] Trying to model query in Class::DBI
[prev]
[thread]
[next]
[Date index for 2006/01/05]
Thanks for the link. The following worked for me: -
__PACKAGE__->set_sql(
by_country_presence => qq{
SELECT c.__ESSENTIAL__
FROM carrier c, carrier_presence cp, location l
WHERE c.carrier_id = cp.carrier_id
AND cp.location_id = l.location_id
AND l.country_id = ?
}
);
Alan
>From: Perrin Harkins <perrin@xxxx.xxx>
>To: Alan Griffiths <ap_griffiths@xxxxxxx.xxx>
>CC: classdbi@xxxxx.xxxxxxxxxxxxxxxx.xxx
>Subject: Re: [CDBI] Trying to model query in Class::DBI
>Date: Wed, 04 Jan 2006 13:30:45 -0500
>
>On Wed, 2006-01-04 at 18:07 +0000, Alan Griffiths wrote:
> > Hi,
> >
> > I'm trying to model the following query in Class::DBI: -
> >
> > SELECT c.name
> > FROM carrier c, carrier_presence cp, location l
> > WHERE c.carrier_id = cp.carrier_id
> > AND cp.location_id = l.location_id
> > AND l.country_id = 1;
> >
> > I thought that DeepAbstractSearch would do the trick, but after
> > reading the documentation it seems not. I'm sure that this is
> > possible, but I'm just missing something.
>
>Is there a reason you don't want to use the SQL you already wrote? Have
>you read this?
>http://wiki.class-dbi.com/wiki/Using_joins
>
>- Perrin
>
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi