<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi all,<br><br>I've got this snippet of SQL which I'm trying desperately to convert to DBIx::Class.<br><br> SELECT stuff <br> FROM Timetable ttb<br> LEFT OUTER JOIN Person prs ON <br> (addr.UNIQUE_ID = prs.UNIQUE_ID AND<br> (<br>
(addr.availableFrom <= prs.availableTo AND addr.availableTo >= prs.publishedFrom <br> )<br> etc., etc<br><br><br><br>Basically there is a table between this Timetable <-> Person "relationship", which is where I am having problems in doing a Timetable->search( { conditions } );<br><br>Timetable:<br>availableTo<br>availableFrom<br>UNIQUE_ID<br><br>Owner:<br>UNIQUE_ID<br><br>Person:<br>availableTo<br>
availableFrom<br>UNIQUE_ID<br><br><br>A lot of other stuff is going on here which is why the relationships seem a little stupid but... I guess it's a MANY-to-MANY between Addressing and Timetable. Ive got no idea how i can actually write a dbixc search command to perform this kind of join... is it even possible ? Anything gratefully received<br><br>best,<br>>j<br></div></div><br>
<hr size=1>
Yahoo! Answers - Get better answers from someone who knows. <a
href="http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU">Try
it now</a>.</body></html>