"where" clause in dynamicdata getitems
Ryan Walker <[email protected]> Tue, 07 Oct 2008 16:58:54 -0400
| Newsgroups | gmane.comp.cms.xaraya.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I can't figure out the syntax for a "where" clause in the following
example...
<xar:set name="where">'signed_up_as eq \'org\''</xar:set>
<xar:set
name="items">xarmodapifunc('dynamicdata','user','getitems',array('modid'
=> 151, 'itemtype' => 61, 'where' => $where))</xar:set>
<xar:foreach in="$items" key="$key" value="$val">
<xar:set name="$aids[]">$key</xar:set>
</xar:foreach>
<xar:set name="pop">array_pop($aids)</xar:set>
<xar:set
name="org_signers">xarmodapifunc('articles','user','getall',array('ptid'
=> 61, 'fields' => array('title','summary','dynamicdata'), 'aids' =>
$aids, 'sort' => 'title ASC', 'where' => 'status eq 2'))</xar:set>
I've tried the following...
<xar:set name="where">'signed_up_as eq \'org\''</xar:set>
<xar:set name="where">'signed_up_as = \'org\''</xar:set>
<xar:set name="where">'signed_up_as eq org'</xar:set>
<xar:set name="where">'dd_534 eq \'org\''</xar:set>
etc.
I'm using array_pop() in this example because for some reason the
getitems function gives me a superfluous (empty) item at the end of the
$aids array, which messes up the articles query.
Thanks,
Ryan
--
Ryan Walker
www.WebCommunicate.net:
Insights and resources for effective websites.