Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
5c99a06f
Commit
5c99a06f
authored
Dec 27, 2006
by
Dries Buytaert
Browse files
- Patch
#85979
by RobRoy, keith.smith, fgm and webchick: improve documentation of db_next_id().
parent
3ec762b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/database.mysql.inc
View file @
5c99a06f
...
...
@@ -249,6 +249,9 @@ function db_error() {
* database tables. Instead, this function is used to return a new unique ID
* of the type requested. If necessary, a new sequence with the given name
* will be created.
*
* Note that the table name should be in curly brackets to preserve compatibility
* with table prefixes. For example, db_next_id('{node}_nid');
*/
function
db_next_id
(
$name
)
{
$name
=
db_prefix_tables
(
$name
);
...
...
includes/database.mysqli.inc
View file @
5c99a06f
...
...
@@ -234,6 +234,9 @@ function db_error() {
* database tables. Instead, this function is used to return a new unique ID
* of the type requested. If necessary, a new sequence with the given name
* will be created.
*
* Note that the table name should be in curly brackets to preserve compatibility
* with table prefixes. For example, db_next_id('{node}_nid');
*/
function
db_next_id
(
$name
)
{
$name
=
db_prefix_tables
(
$name
);
...
...
includes/database.pgsql.inc
View file @
5c99a06f
...
...
@@ -228,6 +228,9 @@ function db_error() {
* database tables. Instead, this function is used to return a new unique ID
* of the type requested. If necessary, a new sequence with the given name
* will be created.
*
* Note that the table name should be in curly brackets to preserve compatibility
* with table prefixes. For example, db_next_id('{node}_nid');
*/
function
db_next_id
(
$name
)
{
$id
=
db_result
(
db_query
(
"SELECT nextval('%s_seq')"
,
db_prefix_tables
(
$name
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment