Recent Changes - Search:

Administrators

Developers

Articles

Cookbook

edit

HowToExecuteAnOQLQueryOnTheServerSide

Developers.HowToExecuteAnOQLQueryOnTheServerSide History

Hide minor edits - Show changes to output

November 28, 2005, at 10:45 PM by Tassos Koutsovassilis -
Added lines 1-12:
The following code snippet demonstrates how to execute an OQL command on the server side, inside the "''execute''" method of a HTTPServlet:

%code%
[@
from porcupine.oql.command import OqlCommand
oCmd = OqlCommand()
sOql = "select id, displayName, icon from 'apps' order by displayName asc"
apps = oCmd.execute(sOql)
for app in apps:
self.response.write('App Name: ' + app['displayName'] + '<br>')
self.response.write('App icon: ' + app['icon'] + '<br>)
@]
Page last modified on November 28, 2005, at 10:45 PM