Is there a simple way to join 2 tables that have a one to one relationship?
--
Sean Ford
SPF Management, LLC
c: 305.788.3673
w: http://twitter.com/seanford
w: http://facebook.com/seanpford
--
You received this message because you are subscribed to the Google Groups "DataMgr" group.
To post to this group, send email to dat...@googlegroups.com.
To unsubscribe from this group, send email to datamgr+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/datamgr?hl=en.
Great question. It (along with another email this week) inspired me to
release a custom tag set that I have been intending to release for
some time.
http://www.bryantwebconsulting.com/blog/index.cfm/2010/10/1/Introducing-CFDMQuery
As you can see, that would allow you to write a SQL statement with a
join on multiple tables (or any other SQL basically) and still take
advantage of DataMgr features such as relation fields.
What I don't have (yet) is a getSelectSQL method in DataMgr that works
like the getWhereSQL method. I hope to have that for the next build.
This should really make that easier by allowing code like this:
<CF_DMQuery name="qMyRecords">
SELECT <cf_DMSQL method="getSelectSQL" tablename="tableA">,
<cf_DMSQL method="getSelectSQL" tablename="tableB">
FROM tableA,tableB
WHERE tableA.field = tableB.field
</CF_DMQuery>
Hope that helps!
Steve