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 |
Drupal provides a standard, vendor-agnostic abstraction layer for accessing database servers.
3
votes
Accepted
Avoid PDOException while connecting to an external database
issue is that db_set_active just sets active key in some array and doesn't do any connection. when you do db_select or any other query only then it connects.
your second code is good. also you could …
1
vote
How do I properly combine UNION with LIMIT?
looks like there is small bug in Drupal.
but there is workaround:
$subquery_1 = db_select('node', 'n')
->range(0,4);
$subquery_2 = db_select('node', 'n')
->range(0,8);
$query = $subquery_1->union( …
1
vote
Accepted
Deciphering Views SQL
how table aliases are created in joins is pretty simple - to have unique alias views takes names of both tables and combines them.
you can check more simple example:
SELECT node.created AS node_creat …