The database.inc have these comments
* For example, one might wish to return a list of the most recent 10 nodes
* authored by a given user. Instead of directly issuing the SQL query
* @code
* SELECT n.title, n.body, n.created FROM node n WHERE n.uid = $uid LIMIT 0, 10;
* @endcode
* one would instead call the Drupal functions:
* @code
* $result = db_query_range('SELECT n.title, n.body, n.created
* FROM {node} n WHERE n.uid = %d', $uid, 0, 10);
* while ($node = db_fetch_object($result)) {
* // Perform operations on $node->body, etc. here.
The body field is no longer part of the node table. It belongs to node_revisions now
Comment | File | Size | Author |
---|---|---|---|
#1 | 232321-misleading-database-inc-documentation-d6.patch | 1.15 KB | brianV |
Comments
Comment #1
brianV CreditAttribution: brianV commentedAttached patch brings the example in the documentation in line with the D7 documentation. Trivial, so RTBCing myself.
Comment #2
Crell CreditAttribution: Crell commentedI'm Larry Garfield, and I approve this patch. Hey bot, are you paying attention?
Comment #3
Gábor HojtsyCommitted to Drupal 6, thank you!