Query Mode

The query mode of the Clients allows you to bind external variables to a query and evaluate the query in an iterative manner. The  function of the instance returns a new query instance.

Usage
The query execution works as follows:
 * 1) Create a new session instance with hostname, port, username and password.
 * 2) Call   with your XQuery expression to get a query object.
 * 3) Optionally bind variables to the query with one of the   functions.
 * 4) Optionally bind a value to the context item via.
 * 5) Iterate through the query object with the   and   functions.
 * 6) As an alternative, call   to get the whole result at a time.
 * 7)   gives you information on query evaluation.
 * 8)   returns the query serialization parameters.
 * 9) Don't forget to close the query with.

PHP Example
Taken from our repository:

 query($input);

// bind variable $query->bind("$name", "number");

// print result print $query->execute."\n";

// close query instance $query->close;

} catch (Exception $e) { // print exception print $e->getMessage; }

// close session $session->close;

} catch (Exception $e) { // print exception print $e->getMessage; } ?>

=Changelog=


 * Version 7.2


 * Added: context function