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:
<?php
$z = yaz_connect(...
yaz_syntax($z, 'opac');
yaz_search($z, 'rpn', '@attr 1=4 "title%"');
yaz_wait();
$hits = yaz_hits($z);
yaz_range($z, 1, $hits);
yaz_present($z);
for($i = 1; $i <= $hits; $i++)
my_display(yaz_record($z, $i, 'opac'));
yaz_close($z);
function my_display($s)
{
$lines = explode("\n", trim($s));
var_dump($lines);
}
?>
yaz_search
(PHP 4 >= 4.0.1, PECL yaz >= 0.9.0)
yaz_search — Prepares for a search
Description
int yaz_search
( int $id
, string $type
, string $query
)
yaz_search() prepares for a search on the target with given id. The type represents the query type - only "rpn" is supported now in which case the third argument is a prefix notation query as used by YAZ. Like yaz_connect() this function is non-blocking and only prepares for a search to be executed later when yaz_wait() is called.
yaz_search
k dot andris at gmail dot com
17-Jun-2009 10:49
17-Jun-2009 10:49
Colibri
22-Jan-2009 04:42
22-Jan-2009 04:42
When querying a SRU/SRW server, the "type" parameter must(?) be specified as "cql", e.g.
yaz_search($handle, "cql", "bath.isbn=1234");
sean at inssystems dot com
08-May-2007 07:23
08-May-2007 07:23
You can find the full Bib-1 attribute set at http://www.loc.gov/z3950/agency/defns/bib1.html
jwohlers at mail dot wcc dot cc dot il dot us
01-Feb-2002 01:21
01-Feb-2002 01:21
Quick Reference For Attribute Fields
(eg: "@attr 2=" refers to the Relation attribute)
1 = Use Field
2 = Relation
3 = Position
4 = Structure
5 = Truncate
6 = Completeness
