Re: Attempt failing.
Adam Tauno Williams <[email protected]> Fri, 04 Sep 2009 15:57:33 -0400
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <1252094253.5268.61.camel@linux-m3mt> |
This is the same instance where Consonance is working?
> Looking for an example of how to format a query in php.
> <?php
> #include "zogi+memcache.php";
> require_once("zogi.php");
> $hostname = "mta1";
> $username = "dbartley";
> $password = "xx";
> $ogo = new OpenGroupwareServer($hostname, $username, $password);
> print $ogo->getLoginAccountId();
> #query = [ { 'conjunction' : 'AND', 'key' : 'name', 'value' : last,
> 'expression' : 'EQUALS' } ]
> $entityName = 'Contact';
> $criteria = array();
> $criteria['key'] = 'name';
> $criteria['value'] = 'Conrad';
> $criteria['expression'] = 'EQUALS';
> #print_r($criteria);
> $flags = array();
> $detail = 0;
> $result = $ogo->searchForObjects($entityName, $criteria, $detail = 1,
> $flags);
> print_r($result);
> ?>
> yeilds the following results. I imagine I'm just composing the criteria
> incorrectly.
> 10220Array ( [faultCode] => 0 [faultString] => ObjcRuntimeException:
> NSConcreteSmallDictionary (instance) does not recognize objectAtIndex:
> { methodName = "zogi.searchForObjects"; methodParameters = ( Contact,
> { expression = EQUALS; key = name; value = Conrad; }, 1, {} ); } )
Try -
searchForObjects($entityName, array($criteria), $detail = 1, $flags);
I believe criteria has to be an array of criteria.
--
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc