Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

yaz search function syntax tag tutorial 2013 Donate at flattr Flattr this

Alert! Connect with 10,000 Chating Online. Join Now

Php yaz search () function

Write your php code

<?php ?>

Php Result

Your code below

(PHP 4 >= 4.0.1, PHP 5)

yaz_search -- Prepares for a search


int yaz_search ( resource id, string type, string query )

yaz_search() prepares for a search on the connection given by parameter id. The parameter type represents the query type - only "rpn" is supported now in which case the third argument specifies a Type-1 query in prefix query notation. Like yaz_connect() this function is non-blocking and only prepares for a search to be executed later when yaz_wait() is called.

The RPN query

The RPN query is a textual representation of the Type-1 query as defined by the Z39.50 standard. However, in the text representation as used by YAZ a prefix notation is used, that is the operator precedes the operands. The query string is a sequence of tokens where white space is ignored unless surrounded by double quotes. Tokens beginning with an at-character (@) are considered operators, otherwise they are treated as search terms.

Table 1. RPN Operators

@and query1 query2intersection of query1 and query2
@or query1 query2union of query1 and query2
@not query1 query2query1 and not query2
@set nameresult set reference
@attrset set queryspecifies attribute-set for query. This construction is only allowed once - in the beginning of the whole query
@attr [set] type=value queryapplies attribute to query. The type and value are integers specifying the attribute-type and attribute-value respectively. The set, if given, specifies the attribute-set.

Example 1. Query Examples

You can search for simple terms, like this

which matches documents where "computer" occur. No attributes are specified.

The Query

"knuth donald"
matches documents where "knuth donald" occur (provided that the server supports phrase search).

This query applies two attributes for the same phrase.

@attr 1=1003 @attr 4=1 "knuth donald"
First attribute is type 1 (Bib-1 use), attribute value is 1003 (Author). Second attribute has is type 4 (structure), value 1 (phrase), so this should match documents where Donald Knuth is author.

This query

@and @or a b @not @or c d e
would in infix notation look like (a or b) and ((c or d) not e).

Another, more complex, one:

@attrset gils @and @attr 1=4 art @attr 1=2000 company
The query as a whole uses the GILS attributeset. The query matches documents where art occur in the title (GILS,BIB-1) and in which company occur as Distributor (GILS).

You can find information about attributes at the Z39.50 Maintenance Agency site.

Note: If you would like to use a more friendly notation, use the CCL parser - functions yaz_ccl_conf() and yaz_ccl_parse().

Php yaz search Function syntax tag

yaz search php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online

Php yaz search syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.

Function index







Date & Time

Directory function




Form data handling

Mathematics operators


Php Mysql

Network Functions


php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online