php - ModX Revo: Query Multiple TVs? -


i'm moving site modx revolution , have no experience xpdo.
the site i'm moving has search feature looks through few tvs assigned resources , returns applicable pages.
i'm having trouble incorporating using xpdo.

i'm able return pages tv set given value, can't figure out how expand into:
find resources tv1 == x, tv2 == y, tv3 == z.
how can query multiple tvs @ once?

$value = "mexico"; $c = $modx->newquery('modresource'); $c->innerjoin('modtemplatevarresource','templatevarresources'); $c->where(array(      'templatevarresources.tmplvarid' => 7,      '"'.$value.'" in (templatevarresources.value)', ));  $resources = $modx->getcollection('modresource',$c); 

hmmmmm think goes this:

$c->where(array(      'tv1:=' => 'x'      'and:tv2:=' => 'y'      'and:tv3:=' => 'z' )); 

would check docs here: http://rtfm.modx.com/xpdo/2.x/class-reference/xpdoquery


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -