;;; sort.mhtml: -*- Meta-HTML -*-  DESCRIPTIVE TEXT.
;;;
;;;  Copyright (c) 1997 Brian J. Fox
;;;  Author: Brian J. Fox (bfox@ai.mit.edu) Sat Jun 14 13:48:07 1997.

<with-open-database db /tmp/test.db mode=write-create>
  <set-var i=1>
  <while <lt i 30>>
    <set-var record::data="This is record #<get-var i>">
    <set-var record::key="Key-<get-var i>">
    <set-var record::number=<get-var i>>
    <set-var saved =
      <database-save-package db <get-var record::key> record strip=t>>
    <increment i>
  </while>
</with-open-database>

<with-open-database db /tmp/test.db mode=read>
<database-query db true sort=number sortorder=reverse format = "<get-var data>\n">
</with-open-database>
