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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 00:01:32 2024 UTC