Re: [socanews] Sort By Day
Hi Joseph,
What you can do is create a drop down field in your radio show section where you pull in a list of djs from your dj section. Use the "get options from the database" option. For the value field, choose num. You can choose whatever field you want for the label field. You can then choose a dj for each radio show.
When displaying the information you can do something like this: (In this example, I'm assuming your dj section is called djs and you field in the radio show section is called dj)
list($radioshowsRecords, $radioshowsMetaData) = getRecords(array(
'tableName' => 'radioshows',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$radioshowsRecord = @$radioshowsRecords[0]; // get first record
list($djRecord,$djMetaData)=getRecords(array(
'tableName' => 'djs',
'allowSearch' => false,
'limit' => 1,
'where' => "num='".intval($radioshowsRecord['dj'])."'",
));
$dj=array();
if($djRecord){$dj=$djRecord[0];}
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/