i’ve searched for hours now, but i can’t figure out why this returns a blank page (no error, none in modx, none in my logs nothing)
$c = $modx->newQuery('modTemplateVarResource');
$c->select('DISTINCT `value`');
$c->where('`tmplvarid` = 30');
$collection = $modx->getCollection('modTemplateVarResource', $c); // script seems to choke here
foreach($collection as $item) {
$test = $item->get('value')."\n";
echo $test;
}
obviously i’ve got something wrong but what is it? (i haven’t been able to find anything on what getCollection actually returns, and all examples use modResource, in this case i’m just trying to get a list of values from any db table, i figured since it’s a modx table i should be able to get it without defining a model/schema etc... am i incorrect in that thought?)