diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-03-16 07:02:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-03-16 07:02:20 +0000 |
commit | 170b674a0953ce95e06f7a8442eb0f1097e7ee72 (patch) | |
tree | 11778666b2fc94cceaa947aea21a71bde0195380 /modules/bloggerapi.module | |
parent | 6dc1cf59ba2ca58f0b4200d820a23dc5f35ec1fb (diff) | |
download | brdo-170b674a0953ce95e06f7a8442eb0f1097e7ee72.tar.gz brdo-170b674a0953ce95e06f7a8442eb0f1097e7ee72.tar.bz2 |
- All LIMIT queries must go through the pager or through db_query_range().
The syntax for db_query_range() was enhanced so it matches db_query(). So
you may pass extra arguments of the SQL statement which are checked via
check_query() and then substituted into the SQL statement. After these
optional arguments, you always pass $from and $count parameters which
define your range. Most often, the $from is 0 and the count is the max
number of records you want returned. Patch by Moshe.
- The pager_query() function for PEAR was enhanced so that it adds proper
GROUP BY statement counting the number of records to be paged. Patch by
James Arthur.
- MSSQL database scheme by Moshe.
Diffstat (limited to 'modules/bloggerapi.module')
-rw-r--r-- | modules/bloggerapi.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bloggerapi.module b/modules/bloggerapi.module index 722447f2f..93ce0dcc9 100644 --- a/modules/bloggerapi.module +++ b/modules/bloggerapi.module @@ -269,7 +269,7 @@ function bloggerapi_node_recent($num) { global $user; if (($num == 0) or ($num > 100)) $num = 50; - $result = db_query("SELECT n.*, u.name FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '%d' ORDER BY n.nid DESC LIMIT %d", $user->uid, $num); + $result = db_query_range("SELECT n.*, u.name FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '%d' ORDER BY n.nid DESC", $user->uid, 0, $num); if ($result) { while ($blog = db_fetch_object($result)) { $body = "<title>$blog->title</title>\n". $blog->body; |