PHP & MySQL

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

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

<?
$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 요즘
26개(2/2페이지)
PHP & MySQL
번호 제목 글쓴이 조회 날짜
6 [PHP] 파일 업로드 구현. 쓰기, 수정 관리자 4379 2013.01.21 15:09
>> [PHP] 엑셀다운, 숫자를 문자로 인식 관리자 9447 2013.01.21 15:09
4 [PHP] 네이버 지도 api 관리자 5234 2013.01.21 14:22
3 [PHP] 특정 날짜 계산 관리자 4454 2013.01.21 14:21
2 [PHP] 한글 잘림 없이 substr처리 관리자 5171 2013.01.21 14:20
1 [PHP] checkbox 배열 값 넘기기 관리자 12959 2013.01.21 14:18
많이 본 글
댓글 많은 글