略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: yaz_search

2024-12-22

add a noteadd a note

User Contributed Notes 3 notes

up
3
jwohlers at mail dot wcc dot cc dot il dot us
20 years ago
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
up
1
k dot andris at gmail dot com
13 years ago
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);
}
?>
up
0
Colibri
13 years ago
When querying a SRU/SRW server, the "type" parameter must(?) be specified as "cql", e.g.
yaz_search($handle, "cql", "bath.isbn=1234");

官方地址:https://www.php.net/manual/en/function.yaz-search.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3