Unfortunately I don't have too much time this and next week, so the fix will have to wait a bit. I'll try and see in the weekend if I can easily fix it.
Ok, in the mean time my work around is as follows: 1 - make a temporary .xq file somwhere on your file-system using PHP 2 - invoke this file using: $output = shell_exec('MapiClient.bat -l xquery tempXQFile.xq'); header("Content-Type: text/xml"); echo $output; But offcourse a proper database-connection is preferred. Looking forward to some kind of solution! With kind regards, Menno Holtkamp -----Original Message----- From: Fabian Groffen [mailto:Fabian.Groffen@cwi.nl] Sent: Thu 11/23/2006 2:35 PM To: monetdb-users@lists.sourceforge.net Cc: Subject: Re: [MonetDB-users] Using MonetDB / XQuery with PHP On 23-11-2006 14:21:44 +0100, Menno Holtkamp wrote: [snip]
Performing a query with:
$query = 'count(doc("HelloWorld.xml")/doc)'; $result = monetdb_query($query); if(!$result)die("Query failed : " . monetdb_error() ."\n"); else echo '<br>Performed query';
succeeds as well.
But the content of the result set seems to remain 'empty'.
print_r($result) -> Resource id #3
But while($row = monetdb_fetch_array($result)) { print_r($row); }
remains empty.
I see. This is probably because the default XQuery output is a wee bit different. ;) I might be able to fix monetdb_php to support XQuery like JDBC does. Unfortunately I don't have too much time this and next week, so the fix will have to wait a bit. I'll try and see in the weekend if I can easily fix it.
Does somebody have a working example of performing an XQuery using PHP?
No ;)
I wondered, is it required to connect to a specific database in the monetdb_connect command? (the XML-document) I think not, but hey!
Nope; this only works on M5 which has support for multiple catalogs. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users