B

1064 error

zzz.jpg
$sql_common = " from $g4[request_table] ";

$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( $sfl like '$stx%') ";
}

if (!$sst) {
$sst = "regtime";
$sod = "desc";
}

$sql_order = " order by $sst $sod ";

$sql = " select count(*) as cnt
$sql_common
$sql_search
$sql_order ";
$row = sql_fetch($sql);
$total_count = $row[cnt];

~~~~~~~~~~~~~~~~~~~~~중간생략~~~~~~~~~~~~~~~~~~~~~~~~~~~

$sql = " select *
$sql_common
$sql_search
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);


-----------------------------------------------------------------------------------------
select count(*) as cnt from where (1) order by regtime desc

1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where (1) order by regtime desc' at line 3
-----------------------------------------------------------------------------------------


g4_request 테이블은 생성했구요.
따로 만들어진 신청 페이지에서 신청한 사람들 리스트를 보여주는 관리자 페이지입니다.

새로 호스팅 신청해서 옮기는 중인데 이전 전엔 문제없었어요.


첨부된 사진은 완성시 보여지게될 화면이예요.
where (1) 의 쓰임도 모르겠고, .. 뭘 더 말씀드려야할지도 모르겠어요 ;ㅂ;

첨부파일

zzz.jpg (31.4 KB)
0회 2011-02-25 18:05
|

댓글 4개

$g4[request_table] <- 테이블 네이밍이 선언되어 있지 않은것 같습니다.

config.php 에 아래한줄 추가하면 되거예요.
$g4['request_table'] = $g4['table_prefix'] . "request";
죄송한데 그 네이밍 선언은 어떻게 하는건가요?
그누보드/config.php 에 추가하면 됩니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고