In the code from the text: 下面代码是错的

<?php
$result = db_query_range('SELECT n.nid, n.title, n.created
FROM {node} n WHERE n.uid = :uid', array(':uid' => $uid), 0, 10);
foreach($result as $record) {
// Perform operations on $node->title, etc. here.
}
?>

is an error.
According http://api.drupal.org/api/function/db_query_range/7 (db_query_range($query,$from, $count, array $args = array(), array $options = array())) the code must looks so:
下面代码是对的

<?php
$result = db_query_range('SELECT n.nid, n.title, n.created
FROM {node} n WHERE n.uid = :uid', 0, 10, array(':uid' => $uid));
foreach($result as $record) {
// Perform operations on $node->title, etc. here.
}
?>
Files: 
CommentFileSizeAuthor
#2 829152.patch736 bytesnenne
PASSED: [[SimpleTest]]: [MySQL] 20,928 pass(es).
[ View ]