Desperately need help with Join

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 8, 2017   (RSS)

By dlsweb - August 7, 2017

I am lost using Join
Can someone please tell me how to do.

From accounts table, I want to show 'fullname' and 'email' and 'state'
and from festivals table, 'title' and 'begin_date'

accounts.num = festivals.createdByUserNum


// load records from 'accounts'
list($accountsRecords, $accountsMetaData) = getRecords(array(
'tableName' => 'accounts',
'perPage' => '25',
'loadUploads' => false,
'allowSearch' => false,
));

something like?
LEFT JOIN festivals ON accounts.num = festivals.createdByUserNum;


html
<?php echo htmlencode($record['fullname']) ?><br/>
<?php echo htmlencode($record['email']) ?><br/>
<?php echo htmlencode($record['state']) ?><br/>
??
<?php echo htmlencode($record['festivals.title']) ?><br>
<?php echo date("M j, Y", strtotime($record['festivals.begin_date'])) ?><br>

By dlsweb - August 8, 2017

Works great, Thanks so very much