home
 
 

 
Querying the QDL Database
Users familiar with SQL can edit it to perform more sophisticated searches.
 
Only SELECT statements are allowed (i.e., no INSERTS, UPDATES, DELETES, etc.).
 
The SQL has to begin with...
SELECT id FROM [table]
...where the [table] is:
  • tblPages (current versions of QDL posts)
  • tblVersions (previous versions of posts)
The relevant fields are:
  • title
  • comment
  • contents
There are also some special-purpose directives that you can add to the WHERE clause, which QDL will replace with the relevant SQL at response time. This is for useful queries that would be too complicated to document.
  • UnReadPagesOnly
    • This restricts the results to posts that you have not opened (using the disclosure arrows). For example, the following query shows all of the unread pages that have been modified since 2012-01-02.
    • SELECT id FROM pages WHERE (modified > '2012-01-02') AND (UnReadPagesOnly)
  • FindAllChildren
    • This restricts the results to posts that are children of the specified post ID, descending the specified number of levels deep.
  • creator|editor|adder|reader
    • This restricts the results to posts with the specified rights.
  • AnonymousHits
    • This restricts the results to posts that are in the list of posts accessed by anonymous users, sorted by the number of hits.
    • SELECT id FROM tblPages WHERE (id IN (AnonymousHits(20))

↑ UP Powered by Quick Disclosure Lite
© 2010~2021 SCS-INC.US
NEXT →