I'm in the process of trying to execute a simple query to data saved from the Tagger component, but am not able to get it to work:
$c = $modx->newQuery('TaggerTagResource',array('resource'=>$landing_id));
$c->select('TaggerTagResource.tag');
$c->leftJoin('TaggerTag','TaggerTag','TaggerTag.id = TaggerTagResource.tag');
$c->where(array(
'TaggerTag.group'=>$match_tag_group_id
));
$c->limit(1);
$tag = $modx->getCollection('TaggerTagResource',$c);
The issue seems to stem from the select column: When it is simply 'tag' the query is built, but ultimately fails because both tables have a 'tag' column; when it is as shown above, the script simply crashes. I'm guessing I'm missing something obvious ... any ideas?