see: http://drupal.org/node/293551

The example code for using the database extraction layer and db_query, which is displayed at api.d.o: http://api.drupal.org/api/group/database/7 is wrong for 4.7.x, 5.x, 6.x, and 7.x. Looks like the example was never updated since 4.6.x?

Obviously, this example may become something different entirely for 7.x if the DBTNG patch lands.

CommentFileSizeAuthor
#1 db-example-293558-6x-1.patch1.19 KBpwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Version: 7.x-dev » 6.x-dev
Status: Active » Needs review
FileSize
1.19 KB

The DBTNG patch partially changes the example, but does not correct the fact the n.body does not exist. I'll add a comment on that issue and let any other changes for 7.x happen there. Hence moving this to 6.x.

https://4si.devguard.com/svn/public/pdo/includes/database.inc

Attached patch is the easiest fix - just omit n.body, rather than adding the complication of a JOIN to the example.

mr.baileys’s picture

Status: Needs review » Reviewed & tested by the community

RTBC.

Gábor Hojtsy’s picture

Let's get this fixed first in Drupal 7 and then backport as usual or we risk keeping this issue in 7.x!

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Postponed
pwolanin’s picture

Version: 6.x-dev » 7.x-dev
Status: Postponed » Needs work
aspilicious’s picture

Is this still relevant? Cause I can't fine the example...

Damien Tournoud’s picture

Version: 7.x-dev » 5.x-dev
Component: database system » documentation
Status: Needs work » Active

Seems to has been fixed somewhere else for D6 and D7. D5 is wrong, as shown on the API page.

jhodgdon’s picture

Status: Active » Closed (won't fix)

7.0 is out tomorrow, 5.x is obsolete, won't fix, sorry.