Joining two tables twice

2 posts by 2 authors in: Forums > CMS Builder Community
Last Post: July 22, 2016   (RSS)

By ciaran_mac - July 13, 2016

I have two tables:

-          Fixtures_Results

-          Clubs

Inside the Clubs, I have a list of clubs and inside them it includes the name of the club, logo etc.

In the Fixtures_Results a typical entry includes the following:

-          Home team (Taken from Club table)

-          Away team (Taken from Club table)

-          Venue (Entered)

Now to the issue.  I want to display the fixture on my website. I can display the Home Team, Away Team and Venue. But I want to show their logos as well.

Here is the code that I am using to display the logo for one the away team.

// load records from 'fixtures_results'

  list($fixtures_resultsRecords, $fixtures_resultsMetaData) = getRecords(array(

    'tableName'   => 'fixtures_results',

    'leftJoin'   => array('clubs' =>  'ON clubs.num = fixtures_results.away_team' ),

    'limit'       => '3',

    'loadUploads' => true,

    'allowSearch' => false,


How would I show the Home Team logo as well?