Hi,
I'd like a DataObject::get call to return what it normally does, plus another field with the same value for each row (I won't bore you with why)
I thought I could use the join parameter to create a cartesian result-set thus:
$results = DataObject::get('AcademicVideoPage', null, null, "INNER JOIN (SELECT $this->vpid AS `vpid`) AS `v`");
However, whenever I try to output $vpid to the template, nothing is inserted. All the normal AcdemicVideoPage fields are there though.
doing a var_dump on $results confirms that vpid is not there.
What exactly am I doing wrong here - the documentation seems to imply that I can do it this way, but I may be misreading/misunderstanding.
Many thanks for any help.
Version 2.3.3, OS X