Re: [CDBI] How to acess data through manytomany
[prev]
[thread]
[next]
[Date index for 2006/01/04]
On Wed, Jan 04, 2006 at 05:28:41PM +0100, Bernard FRIT wrote:
> What I want is to get all the rows from "Livre" according to a search
> like criteria on "Sousrubrique" but all I can get is an iterator. Is
> there any way to populate an array
> of hashes containing all the essential columns (without any explicit
> programmation) ?
Hope I understand your question:
With Class::DBI::Sweet as your base class you can do joins in your search:
@albums = Cd->search( { 'artists.artist.name' => $artist_name } );
That generates:
SELECT me.id, me.title
FROM cd me, artist artist, artist_cd artists
WHERE ( artist.name = ? ) AND artists.artist = artist.id AND me.id = artists.cd
--
Bill Moseley
moseley@xxxx.xxx
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
|
Re: [CDBI] How to acess data through manytomany
Bill Moseley 19:03 on 04 Jan 2006
|