From Porcupine wiki

Developers: HowToExecuteAnOQLQueryOnTheClientSide

By default, Porcupine comes configured with an XMLRPC method called "executeQqlCommand", which is bound to the server's root folder. This method accepts the OQL command string as an argument and returns a JavaScript array with the result set.

var xmlrpc = new XMLRPCRequest(QuiX.root);
var sQuery = "select id, displayName, icon from 'apps' order by displayName asc";
xmlrpc.oncomplete = executeQuery_oncomplete;
xmlrpc.callmethod('executeOqlCommand', sQuery);

function executeQuery_oncomplete(req) {
    var oResults = req.response;
    for (var i=0; i<oResults.length ; i++) {
        ...
    }
}
Retrieved from http://wiki.innoscript.org/pmwiki.php/Developers/HowToExecuteAnOQLQueryOnTheClientSide
Page last modified on September 22, 2006, at 05:30 PM