[Monetdb-developers] Re: FW: Returned mail: see transcript for details
Ignacio Hernandez-Ros wrote:
Hello,
I'll try to send a patch.
This is what happens when the query is executed in MapiClient.
[ihr@jo-con-el FRTA2]$ cat > test.xq <hello>hola</hello> [ihr@jo-con-el FRTA2]$ MapiClient -lxquery test.xq <hello>hola</hello> [ihr@jo-con-el FRTA2]$
And this is what happens when the query is executed in MapiClient using mil language.
[ihr@jo-con-el FRTA2]$ MapiClient -lmil # Monet Database Server V4.9.0 # Copyright (c) 1993-2005, CWI. All rights reserved. # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. mil>xquery("xml","<hello>hola</hello>"); <?xml version="1.0" encoding="utf-8"?> <XQueryResult> <hello>hola</hello> </XQueryResult> mil>
The result of an xquery is not a table with rows and columns. Is another piece of XML that I don't know how to get it back into the PHP code.
As far as I know, this should be represented as one column. Maybe it isn't. Sjoerd will know the answer. Perhaps it works better for you in this case if you use the xquery language, instead of mil from your PHP script. Again, I think Sjoerd knows for sure how the response is given shape.
What you sent me didn't work. Thank you for your support. Are there more alternatives?
Regards, IHR
Ignacio Hernandez-Ros XBRL International Inc. - Technology Development ihr@xbrl.org Cell: +34 609027754
Fabian (MonetDB Project) wrote:
Ignacio Hernandez-Ros wrote:
Hello,
I'll try to send a patch.
I have already implemented a patch. It uses #if PHP_API_VERSION <= 20020918 to distinguish between PHP 4 and 5.
This is what happens when the query is executed in MapiClient.
[ihr@jo-con-el FRTA2]$ cat > test.xq <hello>hola</hello> [ihr@jo-con-el FRTA2]$ MapiClient -lxquery test.xq <hello>hola</hello> [ihr@jo-con-el FRTA2]$
And this is what happens when the query is executed in MapiClient using mil language.
[ihr@jo-con-el FRTA2]$ MapiClient -lmil # Monet Database Server V4.9.0 # Copyright (c) 1993-2005, CWI. All rights reserved. # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. mil>xquery("xml","<hello>hola</hello>"); <?xml version="1.0" encoding="utf-8"?> <XQueryResult> <hello>hola</hello> </XQueryResult> mil>
The result of an xquery is not a table with rows and columns. Is another piece of XML that I don't know how to get it back into the PHP code.
As far as I know, this should be represented as one column. Maybe it isn't. Sjoerd will know the answer. Perhaps it works better for you in this case if you use the xquery language, instead of mil from your PHP script. Again, I think Sjoerd knows for sure how the response is given shape.
The result in both cases is indeed a one-column table of strings which you should be able to read using the normal MAPI functions. The deal with the <XQueryResult> tag is that in the MapiClient -lxquery case you can add an option -sxml to get the answer encapsulated in <XQueryResult> tags.
What you sent me didn't work. Thank you for your support. Are there more alternatives?
Regards, IHR
Ignacio Hernandez-Ros XBRL International Inc. - Technology Development ihr@xbrl.org Cell: +34 609027754
------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- Sjoerd Mullender
participants (2)
-
Fabian (MonetDB Project)
-
Sjoerd Mullender