Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Active record models (or “records”) are models, with a database-facing layer built in.
5
votes
Accepted
How can I expand on a normal Craft query to sort by a column in a custom table?
You can't do this using the craft.entries tag in twig. You'll need to create a new function in your plugin that returns the entries in your custom order.
Assuming you can create an array of element i …
3
votes
Accepted
How can I join plugin data with entry data based on uri?
You could of course manually create a select query with a join that fetches entries ordered by hits descending, however you will basically be recreating what $criteria->find() does above. I imagine th …
2
votes
Populate a record with a model?
Yii's setAttributes method is probably a better way to do this than the populateRecords method, as by default assignments will only be made to safe attributes.
See this wiki article, Understanding "S …