exaplme : http://api.drupal.org/api/group/database/5 doesn,t work. i get error: no field 'n.body', i looked in database and indeed theres no field 'body' in node tabale. i dont get it, am i doing soething wrong or this example is wrong?
anyway, how to use db_query to get node ( with body [ and my cck fields])??
tnx for support

Comments

davedelong’s picture

The "body" of the node is actually contained in the node_revisions table. You'll need to inner join on the vid to get the body.

edit: yes, this means the example is incorrect.

HTH,

Dave

Get great Drupal hosting at MM Hosting. (I don't work for them; I'm just a very satisfied customer)

robert774’s picture

tnx , i hope it inner joins transparently to developer :D ,in some magic way , stupid my :D,

pwolanin’s picture

Yep, that example is way out of date. It's derived from the code comments of database.inc, so fixing it needs a core patch. Issue here: http://drupal.org/node/293558

---
Work: BioRAFT