prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $item_num = $row["num"]; $item_id = $row["id"]; $item_name = $row["name"]; $item_nick = $row["nick"]; $item_hit = $row["hit"]; $image_name[0] = $row["file_name_0"]; $image_name[1] = $row["file_name_1"]; $image_name[2] = $row["file_name_2"]; $image_copied[0] = $row["file_copied_0"]; $image_copied[1] = $row["file_copied_1"]; $image_copied[2] = $row["file_copied_2"]; $item_date = $row["regist_day"]; $item_date = substr($item_date,0,10); $item_subject = str_replace(" ", " ", $row["subject"]); $item_content = $row["content"]; $is_html = $row["is_html"]; if ($is_html!="y"){ $item_content = str_replace(" ", " ", $item_content); $item_content = str_replace("\n", "
", $item_content); } $new_hit = $item_hit + 1; try{ $pdo->beginTransaction(); $sql = "update chandj.free set hit=? where num=?"; // 조회수 증가 $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $new_hit, PDO::PARAM_STR); $stmh->bindValue(2, $num, PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } ?>
 
| 조회 : |
785) $image_width[$i] = 785; // image 타입 1은 gif 2는 jpg 3은 png if($image_type[$i]==1 || $image_type[$i]==2 || $image_type[$i]==3){ print "

"; } } } ?>
query($sql); // ripple PDOStatement 변수명을 다르게 } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } while ($row_ripple = $stmh1->fetch(PDO::FETCH_ASSOC)) { $ripple_num = $row_ripple["num"]; $ripple_id = $row_ripple["id"]; $ripple_nick = $row_ripple["nick"]; $ripple_content = str_replace("\n", "
", $row_ripple["content"]); $ripple_content = str_replace(" ", " ", $ripple_content); $ripple_date = $row_ripple["regist_day"]; ?>
  •     [삭제]"; } ?>
      getMessage(); } ?>