테스트 사이트 - 개발 중인 베타 버전입니다

그누4에서 그누5로 넘어오면서 잘되던 소스가 안되네요 ㅠㅠ 채택완료

프리피아 8년 전 조회 5,113

그누4에서 잘되던 댓글 엑셀다운받는 소스인데요

그누5에서는 내용이 넘어오질 않습니다..

벌써 한달째 매달리고 있는데...이거 소스중에 빨간색표시 MySql 코딩에서 문제가 있는거 같은데요..

제 능력에서는 도저히 답이 안보이네요 ㅠㅠ

 

$wr_id = $_GET['wr_id'];      // 넘어온 값 (게시글 id) $bo_t = $_GET['bo_t'];        // 넘어온 값 (테이블명)

$excel_down = "g5_write_".$bo_t; // 엑셀 다운로드 테이블 설정

$g4[title] = "엑셀 문서 다운로드"; header( "Content-type: application/vnd.ms-excel" ); header( "Content-Disposition: attachment; filename=exam_list.xls" ); header( "Content-Description: PHP4 Generated Data" );

 

$result=@mysql_query("select'>$result=@mysql_query("se​lect * from $excel_down where wr_is_comment = '1'  and wr_parent = '$wr_id' order by wr_datetime asc");   // <-이부분이 문제인듯 합니다...ㅜㅜ

?> <?=$g4[title]?>

                         

// 날짜에 월,일 구분 "-" 넣기 $tmp_date = substr($tmp[0],0,4).-substr($tmp[0],4,2).-substr($tmp[0],6,2);

echo"  

                                "; } ?>
번호성명성별신청일전화번호휴대폰직업생년월일이메일우편번호주소
$i$data[wr_name]$tmp[1]$data[wr_datetime]$tmp[4]$tmp[5]$tmp[2]$tmp_date$tmp[3]$tmp[6]-$tmp[7]$tmp[8] $tmp[9]

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

답변 2개

채택된 답변
+20 포인트
s
sinbi Expert
8년 전

아래처럼 바꿔보세요.

 

mysql_query --> sql_query   

mysql_fetch_array  --> sql_fetch_array

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

프리피아
8년 전
헛 바꾸니까 되네요!!! 정말 감사합니다 ㅠㅠ

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

$result1=" target="_blank">@mysql_query("se​lect * from $excel_down where wr_is_comment = '1'  and wr_parent = '$wr_id' order by wr_datetime asc");  

// 본문 소스 이건데....이상하게 들어가있네요...혹시 다른분들 헷갈리실까바 써놓습니다.

sinbi님 답변처럼 바꾸니까 바로 해결 됬습니다~​

로그인 후 평가할 수 있습니다

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

답변을 작성하려면 로그인이 필요합니다.

로그인