[Catalyst] Read operation over multiple tables

Nagarajan M naga_cit at yahoo.co.in
Sat Sep 30 01:17:41 CEST 2006


Hi, 
   
  I have three tables and the relations described as below
   
  1. books
       - book_id
       - book_name
   
  (has many authors)
   
  2.  author
       - author_id
       - author_name
   
  (has many books)
   
  3. book_author
      - book_author_id
      - book_id (from book table)
      - author_id (from author table)
      - comments
   
  belongs to book
  belongs to author
   
  Its all loaded successfully when I start the catalyst developement server.
   
  Here is the problem,
   
  I want to read data which involves all three tables,
   
  Here is the SQL,
  ======  select c.* from book c, author b, book_author t where t.author_id=b.author_id and t.book_id=c.book_id and c.book_name='something';
   
  In the catalyst example, I seeing  only
  $c->stash->{books}    
  How to do the above sql in catalyst DBIC plugin ...
   
   
  Thanks for your time ....
  Nagarajan
   
   
   

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060930/4fc07f6d/attachment.htm 


More information about the Catalyst mailing list