php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28353 yaz_record function not returning array
Submitted: 2004-05-10 20:53 UTC Modified: 2007-04-04 20:06 UTC
From: asnagy@php.net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.6 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 20:53 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 22:15 UTC] dickmeiss@php.net
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 Oct 18 02:01:27 2024 UTC