Posted by fgm on September 25, 2006 at 9:06pm
7 followers
| Project: | Drupal core |
| Version: | 5.x-dev |
| Component: | database system |
| Category: | task |
| Priority: | normal |
| Assigned: | webchick |
| Status: | closed (fixed) |
Issue Summary
For most situations, the format of the $name parameter to db_next_id($name) should be: {sometable}_someid.
This rule is followed by all calls to db_next_id() in core, and part of contrib. However, there are many contributed modules using the non-prefixed form: sometable_someid instead, which can cause issues on multisites.
This should be documented on the API page for db_next_id().
Comments
#1
Yes, it should. Thanks for catching this.
#2
Oops. That included a completely different thing.
#3
The examples should have single quotes.
#4
Changed quotes to single.
#5
#6
Modified the patch in #4 such that both examples of db_next_id calls in the comments used single quotes, and added "curly" before the word brackets as well, per http://en.wikipedia.org/wiki/Bracket which states, in part:
"Presumably due to the similarity of the words brace and bracket (although they do not share an etymology), many people casually treat brace as a synonym for bracket. Therefore, when it is necessary to avoid any possibility of confusion, such as in computer programming, it may be best to use the term curly bracket rather than brace. However, general usage in North American English favours the latter form. The term curly braces is redundant since no other type of brace exists. Indian programmers often use the name "flower bracket"."
#7
Looks good to me.
#8
Oops, think we're missing mysqli docs.
#9
...and comments copied to equivalent position within database.mysqli.inc....
#10
Committed to CVS HEAD. Thanks.
#11