cnt, cf_page_rows 땀표 정리 및 #47의 1에 따른 처리

This commit is contained in:
whitedot
2012-11-16 10:39:15 +09:00
parent 1149d86cf7
commit 09bc4e69b2
24 changed files with 48 additions and 47 deletions

View File

@ -31,9 +31,9 @@ $sql = " select count(*) as cnt
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$total_count = $row[cnt];
$rows = $config['cf_page_rows'];
$rows = $config[cf_page_rows];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함