[XQZone General] phpxdbc patch
Raffaele Sena
raff at aromatic.org
Wed Dec 22 09:13:40 PST 2004
Thanks! I'll add it and check it in.
-- Raffaele
On Dec 22, 2004, at 7:06 AM, Matt Griffin wrote:
> Here is a (well formed) patch for USAGE.txt which adds an explanation
> of xdbc_bind_param.
>
> Matt
>
>
> Raffaele Sena wrote:
>> Also, can you send an example of using it ? (I am assuming you
>> populate the
>> param array by calling xdbc_bind_param, but a short note would help).
>> Thanks!
>> -- Raffaele
>
>
> !DSPAM:41c98318204903788084981!
> Index: USAGE.txt
> ===================================================================
> --- USAGE.txt (revision 273)
> +++ USAGE.txt (working copy)
> @@ -32,6 +32,23 @@
> logging in (but most of the times you would want to login). Also, the
> default
> value for $flags is XDBC_ARRAY.
>
> +$params is a special array populated by calling xdbc_bind_param as
> follows:
> +
> + xdbc_bind_param(&$array, $lname, $style, $value [, $ns])
> +
> +where:
> + $array: array reference - array which will contain parameters and
> be passed to xdbc_query
> + $lname: string - local name of the parameter (externally defined
> xquery variable)
> + $stype: string - schema type of the parameter (e.g. "xs:string")
> + $value: string - string representation of the parameter's value
> + $ns: string - parameter's namespace
> +
> +example:
> + $params = array();
> + xdbc_bind_param(&$params, "param1", "xs:string", "value 1");
> + xdbc_bind_param(&$params, "param2", "xs:integer", "2");
> + $ret = xdbc_query($host, $query, $params, $userpass);
> +
> The result of an XQuery can normally be one single XML element (of
> course with
> nested elements) or a list of nodes (XML elements, numbers, strings,
> etc.)
>
>
>
> !DSPAM:41c98318204903788084981!
> _______________________________________________
> General mailing list
> General at xqzone.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>
>
> !DSPAM:41c98318204903788084981!
More information about the General
mailing list