ID: 28353 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: YAZ related Operating System: Linux PHP Version: 4.3.6 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2004-05-10 20:53:44] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28353&edit=1