This always stumps me
3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 23, 2011 (RSS)
How do I get fields from a related table?
I want to list "events";
Te field "<?php echo $record['title:label'] ?>" is actually pulled from another table "artists". Each artist record has various fields such as "image", "URL" etc.
What is the best way of getting this related data?
I want to list "events";
// load records
list($gigs_eventsRecords, $gigs_eventsMetaData) = getRecords(array(
'tableName' => 'gigs_events',
));
Te field "<?php echo $record['title:label'] ?>" is actually pulled from another table "artists". Each artist record has various fields such as "image", "URL" etc.
What is the best way of getting this related data?
Cheers,
Tim (toledoh.com.au)
Tim (toledoh.com.au)
Re: [Toledoh] This always stumps me
By Jason - September 23, 2011
Hi Tim,
Take a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=81954#81954
It shows how to get a list of related records without having to use a join. This should help you get started.
Take a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=81954#81954
It shows how to get a list of related records without having to use a join. This should help you get started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] This always stumps me
Thanks for that! Easy!
Cheers,
Tim (toledoh.com.au)
Tim (toledoh.com.au)