To display holdings data set the syntax and the record format to "opac" (at least for Horizon ILS). It will give you an xml, containg <holding> elements with all info:
$z = yaz_connect(...
yaz_search($z, 'rpn', '@attr 1=4 "title%"');
$hits = yaz_hits($z);
yaz_range($z, 1, $hits);
for($i = 1; $i <= $hits; $i++)
my_display(yaz_record($z, $i, 'opac'));
$lines = explode("\n", trim($s));
(PHP 4 >= 4.0.1, PECL yaz >= 0.9.0)
yaz_search — Prepares for a search
yaz_search() prepares for a search on the given connection.
The connection resource returned by yaz_connect().
This parameter represents the query type - only "rpn" is supported now in which case the third argument specifies a Type-1 query in prefix query notation.
The RPN query is a textual representation of the Type-1 query as defined by the Z39.50 standard. However, in the text representation as used by YAZ a prefix notation is used, that is the operator precedes the operands. The query string is a sequence of tokens where white space is ignored unless surrounded by double quotes. Tokens beginning with an at-character (@) are considered operators, otherwise they are treated as search terms.
RPN Operators Construct Description @and query1 query2 intersection of query1 and query2 @or query1 query2 union of query1 and query2 @not query1 query2 query1 and not query2 @set name result set reference @attrset set query specifies attribute-set for query. This construction is only allowed once - in the beginning of the whole query @attr [set] type=value query applies attribute to query. The type and value are integers specifying the attribute-type and attribute-value respectively. The set, if given, specifies the attribute-set.
You can find information about attributes at the » Z39.50 Maintenance Agency site.
TRUE în cazul
FALSE în cazul eșecului.
Example #1 Query Examples
You can search for simple terms, like this:
This query applies two attributes for the same phrase.
@and @or a b @not @or c d e
Another, more complex, one:
@attrset gils @and @attr 1=4 art @attr 1=2000 company
When querying a SRU/SRW server, the "type" parameter must(?) be specified as "cql", e.g.
yaz_search($handle, "cql", "bath.isbn=1234");