Permalink
Browse files

update

  • Loading branch information...
1 parent d39b832 commit 87564e1af76469ab233295f2cc08e549c7b02382 @williamjxj committed Dec 7, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 f1Class.php
View
@@ -177,7 +177,7 @@ function get_category_count($cate_id) {
}
function get_item_count($iid) {
- $sql = "select count(*) from items where iid=" . $iid;
+ $sql = "select count(*) from contents where iid=" . $iid;
$res = mysql_query($sql);
$row = mysql_fetch_row($res);
mysql_free_result($res);
@@ -207,7 +207,7 @@ function get_item_contents($iid)
from contents where language='" . $this -> lang . "' and iid=$iid order by iid desc limit 0, ".ROWS_PER_PAGE;
if(!isset($_SESSION[PACKAGE]['cate_item']) || empty($_SESSION[PACKAGE]['cate_item']['total_pages'])) {
- $total = $this->get_category_count($cate_id);
+ $total = $this->get_item_count($iid);
$total_pages = ceil($total / ROWS_PER_PAGE);
$_SESSION[PACKAGE]['cate_item']['total'] = $total;
$_SESSION[PACKAGE]['cate_item']['total_pages'] = $total_pages;
@@ -218,7 +218,7 @@ function get_item_contents($iid)
else {
$this->__p($_SESSION[PACKAGE]);
exit;
- }
+ }
$res = $this -> mdb2 -> queryAll($sql, '', MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($res))

0 comments on commit 87564e1

Please sign in to comment.