Misleading documentation for db_rewrite_sql()

Darren Oh - October 11, 2007 - 18:26
Project:Drupal
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:patchnewbie
Status:closed
Description

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

#1

Darren Oh - October 11, 2007 - 18:27
Status:active» needs review
AttachmentSizeStatusTest resultOperations
database.inc-182728.patch832 bytesIgnoredNoneNone

#2

Dries - October 12, 2007 - 14:20
Status:needs review» fixed

Committed. Thanks.

#3

Darren Oh - October 18, 2007 - 22:53
Status:fixed» patch (to be ported)

Applied to HEAD in CVS commit 84159.

#4

patchnewbie - October 18, 2007 - 23:32
Assigned to:Anonymous» patchnewbie

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

#5

hazexp - October 21, 2007 - 13:13

Patch ported to D6.

AttachmentSizeStatusTest resultOperations
database_13.patch605 bytesIgnoredNoneNone

#6

patchnewbie - October 26, 2007 - 21:59
Status:patch (to be ported)» needs review

Great! Marking for review.

#7

fp - October 31, 2007 - 21:37
Status:needs review» reviewed & tested by the community

Tested - fantastic!

#8

drumm - November 7, 2007 - 05:56
Status:reviewed & tested by the community» fixed

Committed to 5.x

#9

Darren Oh - November 13, 2007 - 18:23

Fixed in CVS commit 87175.

#10

gpk - November 22, 2007 - 23:23

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

#11

Anonymous - December 6, 2007 - 23:31
Status:fixed» closed

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

#12

gpk - December 8, 2007 - 23:48
Version:5.x-dev» 6.x-dev
Status:closed» 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 KBIgnoredNoneNone

#13

Gábor Hojtsy - December 14, 2007 - 19:16
Status:needs review» fixed

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

#14

gpk - December 15, 2007 - 15:11

Thanks Gábor.

(Commit #91420.)

#15

Anonymous - December 29, 2007 - 15:11
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.