PHP & MySQL

엑셀다운, 숫자를 문자로 인식

관리자 | 2013.01.21 15:09 | 조회 9392

<?
$dir = "../..";
include "$dir/inc/connect.php";
include "$dir/inc/config.php";
$coin_idx = $_REQUEST['index_no'];
$ar_c = sel_query("${basictb}_coin_shop","list_name"," where index_no='$coin_idx'");
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename=".$ar_c[list_name]."_".date('Y-m-d').".xls" );
header( "Content-Description: PHP4 Generated Data" );
print("<meta http-equiv=\"Content-Type\" content=\"application/vnd.ms-excel;charset=euc-kr\">");
?>
<html>
<body>
<table>
<Tr>
<td>핸드폰번호</td>
<td>이름</td>
</tr>
<?
$q = "select * from ${basictb}_coin_order where shop_idx = '$coin_idx' and send_date='' order by index_no desc";
$r = mysql_query($q);
$date=date('Y-m-d');
while($row = mysql_fetch_array($r))
{

mysql_query("update ${basictb}_coin_order set send_date = '$date' where index_no = $row[index_no]");
$ar_m = sel_query("${basictb}_member","name,cp"," where index_no='$row[mem_idx]'");
?>
<tr>
<td style='mso-number-format:\@;'><?=str_replace("-","",$ar_m['cp'])?></td>
<td><?=$ar_m['name']?></td>
</tr>
<?
}
?>
</table>
</body>
</html>

twitter facebook me2day 요즘
38개(2/2페이지)
PHP & MySQL
번호 제목 글쓴이 조회 날짜
18 [MYSQL] semi join으로 인한 비효율을 제거. 관리자 6141 2013.05.15 12:14
17 [PHP] 웹문서 긁어와서 저장 관리자 7311 2013.05.10 12:37
16 [MYSQL] MYSQL DB튜닝 관리자 6150 2013.04.05 10:15
15 [MYSQL] 자주쓰는 MYSQL 관리자 4933 2013.04.05 10:14
14 [PHP] 팝업방지 BHO 사진 관리자 9362 2013.02.28 14:54
13 [PHP] 강제로 파일다운로드 되게 관리자 9529 2013.01.21 16:31
12 [MYSQL] DB생성+ 계정 셋팅 관리자 3700 2013.01.21 15:15
11 [PHP] 리눅스 서버관리 관리자 4212 2013.01.21 15:14
10 [PHP] SI, SM, ERP, EIP, EAI, CMMS, CRM, SCM, GW, KMS 관리자 8853 2013.01.21 15:13
9 [PHP] eclipse 3.7 pdt php 셋팅방법 첨부파일 관리자 6371 2013.01.21 15:12
8 [PHP] PHP 개발 보안가이드 첨부파일 관리자 7268 2013.01.21 15:10
7 [PHP] 파일 업로드 구현. 쓰기, 수정 관리자 4303 2013.01.21 15:09
>> [PHP] 엑셀다운, 숫자를 문자로 인식 관리자 9393 2013.01.21 15:09
5 [MYSQL] union order by 관리자 3876 2013.01.21 14:24
4 [PHP] 네이버 지도 api 관리자 5189 2013.01.21 14:22
3 [PHP] 특정 날짜 계산 관리자 4422 2013.01.21 14:21
2 [PHP] 한글 잘림 없이 substr처리 관리자 5122 2013.01.21 14:20
1 [PHP] checkbox 배열 값 넘기기 관리자 12908 2013.01.21 14:18
많이 본 글
댓글 많은 글