Closed dome closed 12 years ago
To query you would do something like this:
mongodb:query("database.collection", {field=value})
To sort:
mongodb:query("database.collection", {query = {field=value}, orderby = {field = 1}})
To reverse the sort use -1. You can orderby more than one field.
To query you would do something like this:
mongodb:query("database.collection", {field=value})
To sort:
mongodb:query("database.collection", {query = {field=value}, orderby = {field = 1}})
To reverse the sort use -1. You can orderby more than one field.