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/comment/comment.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/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index b86560637..49d6d1da9 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -797,7 +797,7 @@ function comment_save($id, $edit) { function comment_admin_overview($status = 0) { - $result = pager_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON u.uid = c.uid WHERE c.status = '". check_query($status) ."' ORDER BY c.timestamp DESC", 50); + $result = pager_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON u.uid = c.uid WHERE c.status = '". check_query($status). "' ORDER BY c.timestamp DESC", 50); $header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2)); while ($comment = db_fetch_object($result)) { @@ -1465,4 +1465,4 @@ function comment_nodeapi(&$node, $op, $arg = 0) { } } -?> +?>
\ No newline at end of file |