php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56055 yaz_record function not returning array
Submitted: 2004-05-10 14:47 UTC Modified: 2004-05-10 15:32 UTC
From: asnagy@php.net Assigned:
Status: Not a bug Package: yaz (PECL)
PHP Version: 4.3.3 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: asnagy@php.net
New email:
PHP Version: OS:

 

 [2004-05-10 14:47 UTC] asnagy@php.net
Description:
------------
I am using the yaz_record funtion to return an individual record from
the query.  I have specified the 'array' type as my 3rd parameter.  I am
consistently getting a null result. When I specify the type as 'string'
or 'raw', everything works well. 

Reproduce code:
---------------
$conn = yaz_connect(blpcz.bl.uk:21021/BLPC-ALL, array('persistent' =>
false));
yaz_search($conn, 'rpn', $phrase);

yaz_wait();

$hits = yaz_hits($conn);
echo "I have searched, returning $hits records ... ";
$record = yaz_record($conn, 1, 'array');
print_r($record);
yaz_close($conn);

Expected result:
----------------
An associative array 

Actual result:
--------------
null

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-10 15:32 UTC] adam at indexdata dot dk
yaz_record only returns array if either GRS-1 or MARC is 
received from server. This server returns SUTRS so it is impossible to return array.

Use
  yaz_syntax($conn, "GRS-1");
to tell server to return GRS-1. Specify this before yaz_search.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC