Looks like you have quotes inside quotes, which is syntactically incorrect. You can either use double quotes for the outside:
"where doc.space='Main' order by doc.date desc" or double the single quotes inside: 'where doc.space=''Main'' order by doc.date desc' On 08/10/2011 11:55 AM, 许凌志(Jamesxu) wrote: > I use $xwiki.searchDocuments(*'where doc.space='Main' order by doc.date desc > *', 5, 0) to query for recently modified pages under a specific space > "Main", but when I am executing it, error returns. Could anyone can tell me > what is the problem with the query > -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

