I want to select a random object from a a table, MonkeysFist where the selection is restricted by a category with maps to the title of the page. So far I have:
function RandomFist() {
$MFoptions = DataObject::get_one("MFCategory","title=Title");
return DataObject::get_one("MonkeysFist","","MFCategoryID = $MFoptions.ID","RAND()") ;
}
This returns a random object but the from any category not restricted as I need to a specific one. What am I doing wrong?
Thanks
MM