summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-14 19:15:47 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-14 19:15:47 +0000
commitadb03ebe78c83c511fb440d0efe2173a04a77965 (patch)
tree9b4e3a959fc701ed9f99e36efe9c3daf01850b28 /includes
parent5804090b5ae2094576acb440742766eeefe3ad27 (diff)
downloadbrdo-adb03ebe78c83c511fb440d0efe2173a04a77965.tar.gz
brdo-adb03ebe78c83c511fb440d0efe2173a04a77965.tar.bz2
#182728 by gpk: more accurante phpdoc for db_rewrite_sql() and _db_rewrite_sql(), mentioning table aliases used
Diffstat (limited to 'includes')
-rw-r--r--includes/database.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/database.inc b/includes/database.inc
index 917fbb830..7f42e7419 100644
--- a/includes/database.inc
+++ b/includes/database.inc
@@ -226,8 +226,9 @@ define('DB_QUERY_REGEXP', '/(%d|%s|%%|%f|%b)/');
* Query to be rewritten.
* @param $primary_table
* Name or alias of the table which has the primary key field for this query.
- * Possible values are: blocks, comments, forum, node, menu, term_data,
- * vocabulary.
+ * Typical table names would be: {blocks}, {comments}, {forum}, {node},
+ * {menu}, {term_data} or {vocabulary}. However, in most cases the usual
+ * table alias (b, c, f, n, m, t or v) is used instead of the table name.
* @param $primary_field
* Name of the primary field.
* @param $args
@@ -270,13 +271,17 @@ function _db_rewrite_sql($query = '', $primary_table = 'n', $primary_field = 'ni
* @param $query
* Query to be rewritten.
* @param $primary_table
- * Name or alias of the table which has the primary key field for this query. Possible values are: {comments}, {forum}, {node}, {menu}, {term_data}, {vocabulary}.
+ * Name or alias of the table which has the primary key field for this query.
+ * Typical table names would be: {blocks}, {comments}, {forum}, {node},
+ * {menu}, {term_data} or {vocabulary}. However, it is more common to use the
+ * the usual table aliases: b, c, f, n, m, t or v.
* @param $primary_field
* Name of the primary field.
* @param $args
* An array of arguments, passed to the implementations of hook_db_rewrite_sql.
* @return
- * The original query with JOIN and WHERE statements inserted from hook_db_rewrite_sql implementations. nid is rewritten if needed.
+ * The original query with JOIN and WHERE statements inserted from
+ * hook_db_rewrite_sql implementations. nid is rewritten if needed.
*/
function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid', $args = array()) {
list($join, $where, $distinct) = _db_rewrite_sql($query, $primary_table, $primary_field, $args);