Does anyone know of a good tutorial that explains, not with just one example of an easy query, how to create complex select queries in Drupal 7 that uses the preferred method of query writing?
I've written some complex queries in my custom module that use pretty elaborate and long, basic query syntax (a select clause, order by, where, etc.). I'd like to write them in the preferred format for Drupal 7 that I BELIEVE is supposed to look something like this:
I don't find that to be a very useful primer however. I want some actual guidelines for putting together complex statements with all the various options (if something like this exists).
And is it always better to write the queries like this?
I'd like to add a pager and this seems to be the only way to that.
I hope this question isn't too ambiguous. I'm really just looking for a tutorial on constructing these types of queries. Thanks!