Module Relationships and Question about counting number entries in multiple fields.
Using Jamroom
makuta:....I would like to know how to create a relationship between the audio module and a custom review module....
ah, that might be the purpose.You can add save the _item id in the datastore. so if underneath the audio item you add a review template, when you save the info to the review_ data store, add in a field for review_audio_item_id that corresponds to the '_item_id' of the audio file in the audio files datastore.
Then when you search on your datastore, you can retrieve all the associated reviews.
either in code in a module:
// get reviews for audio item 15
$_sp = array(
'search' => array(
"review_audio_item_id = 15"
),
'skip_triggers' => true,
'limit' => 1000000
);
$_rt = jrCore_db_search_items('xxReviews', $_sp);
or in the templates
{jrCore_list module="xxReviews" search="review_audio_item_id = 15" .......}in the example above the module is called xxReviews and i chose audio item id 15, you'd probably use a variable there.
