Documentation
SEARCH
usage
<SEARCH [throw-exception="true"]>
<element [field="value"]* >
<INFO [and_group="string"]>
<textfield [and_group="string"] [ operator="{=,contains,LIKE,md5,encrypt,NE,<>,!=,not contains,IN,in,NOT IN,not in,MATCH AGAINST,starts-with,ends-with,GT,GT=,LT,LT=,between}[ number]" ]> string </textfield>*
<datefield [and_group="string"] [ operator="between,GT,GT=,LT,LT=,starts-with,!=,NE,<>,LIKE,=" ]> value </datefield>*
<numericfield [and_group="string"] [ operator="between,GT,GT=,LT,LT=,starts-with,!=,NE,<>,LIKE,=,md5,IN,in,NOT IN,not in" ]> number </numericfield>*
</INFO>*
[<DESCRIPTIONS>]
<DESCRIPTION>
<STATUS|FULLTEXT|LANGUAGEID|TITLE|HEADER|BODY| SIGNATURE|SUMMARY|BIBLIO|COPYRIGHT|URL [ operator="{=,contains,LIKE,md5,encrypt,NE,<>,!=,not contains,IN,in,NOT IN,not in,MATCH AGAINST,starts-with,ends-with,GT,GT=,LT,LT=,between}[ number]" ]> string </...>*
[<CUSTOM>
<textfield [ operator="{=,contains,LIKE,md5,encrypt,NE,<>,!=,not contains,IN,in,NOT IN,not in,MATCH AGAINST,starts-with,ends-with,GT,GT=,LT,LT=,between}[ number]" ]> string </textfield>*
</CUSTOM>]
</DESCRIPTION>*
[</DESCRIPTIONS>]
[<CATEGORIES>]
<CATEGORY [and_group="string"] [or_group="string"] [operator="not,descendant,="] [path="string"] [ID="number"] [name="string"]/>*
[<CATEGORIES>]
[<COMMENTS>]
<COMMENT [operator="{exists,not}"]>
<TYPE|TITLE|BODY [ operator="{=,contains,LIKE,md5,encrypt,NE,<>,!=,not contains,IN,in,NOT IN,not in,MATCH AGAINST,starts-with,ends-with,GT,GT=,LT,LT=,between}[ number]" ]> string </...>*
<CREATIONDATE|MODIFICATIONDATE [ operator="between,GT,GT=,LT,LT=,starts-with,!=,NE,<>,LIKE,=" ]> value </...>*
<CREATORID|CHECKED [and_group="string"] [ operator="between,GT,GT=,LT,LT=,starts-with,!=,NE,<>,LIKE,=,md5,IN,in,NOT IN,not in" ]> number </...>*
</COMMENT>*
[</COMMENTS>]
<DEPENDENCIES [mode="{normal,reverse}"] [operator="{exists,not,not_exist,none}"]>
[<DEPENDENCY type="deptype1,deptype2" [mode="{normal,reverse}"] [operator="{exists,not,not_exist,none}"]>]
<element [field="value"]* >
<INFO/>*
<DESCRIPTIONS/>*
<CATEGORIES/>*
<COMMENTS/>*
<DEPENDENCIES/>*
[<HITS [operator="{=,LT,LT=,GT,GT=,NE,!=,<>}"]> number </HITS>]
<DEPINFO|COMMENT [ operator="{=,contains,LIKE,md5,encrypt,NE,<>,!=,not contains,IN,in,NOT IN,not in,MATCH AGAINST,starts-with,ends-with,GT,GT=,LT,LT=,between}[ number]" ]> string </...>*
</element>*
[</DEPENDENCY>]
</DEPENDENCIES>*
<DESCENDANT|ANCESTOR [type="deptype1,deptype2"]>
<element [field="value"]* >
<INFO/>*
<DESCRIPTIONS/>*
<CATEGORIES/>*
<COMMENTS/>*
<DEPENDENCIES/>*
</element>*
</...>*
<OMNILINKS>
<OMNILINK type="text" [operator="exist/not"]>
<element [field="value"]* >
<INFO/>*
<DESCRIPTIONS/>*
<CATEGORIES/>*
<COMMENTS/>*
<DEPENDENCIES/>*
[<HITS [operator="{=,LT,LT=,GT,GT=,NE,!=,<>}"]> number </HITS>]
</element>*
</OMNLINK>*
</OMNILINKS>
</element>
</SEARCH>
paramètres
throw-exception : if the command fails throws a PHP exception instead of returning a XML error message
If you want to get elements from the database, you can use the SEARCH command.
The type of elements you want to retrieve is the first childnode of this SEARCH node ( one of the native elements : MEDIA, CONTACT, GROUP, etc, or one you create yourself ).
And this first node will contain the criterions of the elements you want to find.
exemples
<SEARCH>
<MEDIA>
<INFO>
<MEDIATYPE operator="=">News</MEDIATYPE>
</INFO>
</MEDIA>
</SEARCH>
Finds all medias where field Mediatype is "News"
<SEARCH>
<MEDIA>
<INFO>
<MEDIATYPE operator="=">News</MEDIATYPE>
<MEDIATYPE operator="=">Events</MEDIATYPE>
</INFO>
</MEDIA>
</SEARCH>
Finds all medias where field Mediatype is "News" or "Events".
<SEARCH>
<CONTACT>
<INFO>
<FIRSTNAME operator="=">John</FIRSTNAME>
</INFO>
</CONTACT>
</SEARCH>
Finds all contacts with firstname "John".
<SEARCH>
<CONTACT>
<INFO>
<FIRSTNAME operator="=">John</FIRSTNAME>
<LASTNAME operator="=">Doe</LASTNAME>
</INFO>
</CONTACT>
</SEARCH>
Finds all contacts with firstname "John" and lastname "Doe".