| Commit message (Collapse) | Author | Age |
|
|
|
| |
documentation of db_next_id().
|
|
|
|
| |
result was found. Consistent with PHP's mysql_result.
|
| |
|
|
|
|
| |
database abstraction layer and add extra rewriting needed only for Postgres.
|
|
|
|
| |
PostgreSQL. (Critical bug)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
et al: an initial install system for Drupal core.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
upgrade path for incorrectly set up databases)
|
|
|
|
| |
in presence of multiple database connections.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
#36658: Make search query pgsql compatible.
|
|
|
|
| |
- Prefix temporary table names (helps on restricted hosts)
|
|
|
|
| |
not loaded (just showed a blank screen before)
|
|
|
|
|
| |
Presentation about it:
http://www.acko.net/files/drupal-search-slim.pdf
|
|
|
|
|
| |
strings rather than addslashes(). mysql_real_escape_string() uses the
connections charset settings to properly escape.
|
|
|
|
| |
use db_lock_table() and db_unlock_tables() for your code to be compatible.
|
| |
|
|
|
|
| |
as stated in documentation.
|
| |
|
| |
|
|
|
|
|
|
|
| |
up the documentation a little.
chx: can you double-check whether the global $conf variable is secure?
(That is, make sure it can't be send using the URL or something.)
|
| |
|
|
|
|
|
| |
TODO: this patch lets us clean up more code in code! Let's have a look
at this ...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so you can pass the query arguments in. There is however an alternative syntax: instead of passing the query arguments as function arguments, you can also pass a single array with the query arguments in it. For example the following two statements are equivalent:
db_query($query, $a, $b, $c);
db_query($query, array($a, $b, $c));
This usage is particularly interesting when the query is constructed dynamically, and the amount of arguments to pass varies. In that case we use the second method to avoid using call_user_func_array(). This behaviour is not documented explicitly, but it is used in several places.
However, db_query_range() and pager_query() do not support this syntax properly, which means there are several pieces of code which still revert to the ugly call_user_func_array() call.
This patch updates db_query_range() and pager_query() so they support the array-passing method. I also added documentation about this method to each of the db functions.
I also cleaned up the code for db_query (it was weird and hard to understand) and moved db_query() and db_queryd() from database.xxxxx.inc to database.inc: it was the same between both mysql and pgsql, as it doesn't do anything database specific. It just prefixes the tables and inserts the arguments. The actual db query is performed in _db_query(), which is still in database.xxxxx.inc.
Finally, I updated several places with the new syntax, and the code is a lot cleaner. For example:
- array_unshift($params, "SELECT u.* FROM {users} u WHERE $query u.status < 3");
- $params[] = 0;
- $params[] = 1;
- $result = call_user_func_array('db_query_range', $params);
+ $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1);
and
- return call_user_func_array('db_query_range', array_merge(array($query), $args, array((int)$pager_from_array[$element], (int)$limit)));
+ return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit);
I've tested it on mysql. I didn't alter the actual db behaviour, so pgsql should be okay too.
This patch is important because many people avoid the call_user_func_array() method and put data directly into the db query. This is very, very bad because the database prefix will be applied to it, and strip out braces. It's also generally bad form as you have to call check_query() yourself. With the new, documented syntax, there is no more excuse to put data directly in the query.
|
|
|
|
|
|
| |
implemtented it properly per database backend.
Read the manual for pg_escape_string: "Use of this function is recommended instead of addslashes()." Or read sqlite_escape_string: "addslashes() should NOT be used to quote your strings for SQLite queries; it will lead to strange results when retrieving your data."
|
|
|
|
| |
improved consistency to the use of Doxygen/api.module commands in the comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Menu problems with Postgres (this is a highly critical 1 line fix)
2) Archive module fails with Postgres
3) Postgres setup problems - changes to database.pgsql (although i made these changes myself before finding this patch)
4) Book module fails with Postgres
5) Postgres problems following creation of a new type of user - which is actually about a taxonomy.module bug.
6) Creating accregator_item_table in PostgreSQL
7) Postgres - Polls not displayed on Poll Page
8) Blog module has sql errors with postgres
This should not affect MySQL users (hopefully).
|
|
|
|
| |
files consistent with Drupal standards, and adds a wealth of Doxygen-style comments to aid developers in writing solid database access code using the API.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes all doxygen warnings [#]_ in the current code base
+ changes @param style from phpDocumentor (@param type $var desc) to doxygen (@param $var desc)
+ documents all undocumented parameters
+ escapes / fixes html warnings
+ fixes @defgroup in theme.inc
* adds more groupings [#]_
+ drupal_{set|get}_title, drupal_{set|get}_breadcrumb
+ pager.inc: pager_api (pager_query(), pager_display()), pager pieces
* adds a new group "themeable" which contains all themeable functions.
|
|
|
|
|
|
|
|
|
|
| |
Make sure to write:
db_next_id({table}_field);
instead of:
db_next_id(table_field);
|
|
|
|
|
|
| |
Modified patches from Gerhard.
- Changed the order of the checks in node_teaser(). Patch from Kobus.
|
| |
|
|
|
|
| |
- Changed all occurences of '%d' to %d as suggested on the mailing list.
|
|
|
|
|
| |
- case t("whatever");
+ case t("whatever"):
|