Download & Extend

Misleading documentation for db_rewrite_sql()

Project:Drupal core
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:patchnewbie
Status:closed (fixed)

Issue Summary

The primary table name must be in curly braces, otherwise there will be errors when table prefixes are used.

Comments

#1

Status:active» needs review
AttachmentSizeStatusTest resultOperations
database.inc-182728.patch832 bytesIgnored: Check issue status.NoneNone

#2

Status:needs review» fixed

Committed. Thanks.

#3

Status:fixed» patch (to be ported)

Applied to HEAD in CVS commit 84159.

#4

Assigned to:Anonymous» patchnewbie

This would be a good patch for someone new to core development.

#5

Patch ported to D6.

AttachmentSizeStatusTest resultOperations
database_13.patch605 bytesIgnored: Check issue status.NoneNone

#6

Status:patch (to be ported)» needs review

Great! Marking for review.

#7

Status:needs review» reviewed & tested by the community

Tested - fantastic!

#8

Status:reviewed & tested by the community» fixed

Committed to 5.x

#9

Fixed in CVS commit 87175.

#10

Should similar changes also be made to _db_rewrite_sql() for consistency?

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#12

Version:5.x-dev» 6.x-dev
Status:closed (fixed)» needs review

Actually it looks as though the patch at comment #1 got committed first to D6 (although it was intended for D5) then to D5 and the patch at #5 was never applied.

Here's another patch for D6 based on HEAD. It fixes a couple of excessively long lines in the phpdoc of db_rewrite_sql(), clarifies the instructions further, and does same for _db_rewrite_sql() also.

The doc. for http://api.drupal.org/api/function/hook_db_rewrite_sql should also be updated accordingly but I don't know how to do that!

AttachmentSizeStatusTest resultOperations
database.inc-182728.patch1.93 KBIgnored: Check issue status.NoneNone

#13

Status:needs review» fixed

Indeed, we mostly used table aliases but these were not documented. Thanks for the improvement.

#14

Thanks Gábor.

(Commit #91420.)

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.