leftJoin and whereRecordNumberInUrl

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2011   (RSS)

By Perchpole - May 25, 2011

Hi, All

I'm using a leftJoin to pull in records from two tables on to a detail page.

I want to show an article (record table) followed by a brief "About the Author..." footnote at the end (accounts table).

In order to display the correct article I need to use whereRecordNumberInUrl(1) in the where clause. However, because of the leftJoin, this is ambiguous.

How do I get around the issue?

:os

Perch

Re: [Perchpole] leftJoin and whereRecordNumberInUrl

By robin - May 25, 2011

Hey Perch,

You could use getLastNumberInUrl() instead. That will just return the number you need. Then you can use the fully qualified name in your where...
Something like:
"article.num='" . getLastNumberInUrl() . "'"
Hope that helps,
Robin
Robin
Programmer
interactivetools.com