setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $result = $conn->prepare($sql); try { $result->execute(); $rows = $result->fetch(PDO::FETCH_ASSOC); } catch (PDOException $e) { echo "Error : " . $e->getMessage(); } $view = $rows['view'] + 1; $sql = "update workGroup set view='$view' where id ='$_GET[n]' "; $result = $conn->prepare($sql); try { $result->execute($_GET); } catch (PDOException $e) { echo "Error : " . $e->getMessage(); } ?>
บทบาทหน้าที่
งานตามนโยบาย
ระบบงาน
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $result = $conn->prepare($sql); try { $result->execute(); } catch (PDOException $e) { echo "Error : " . $e->getMessage(); } while ($rows = $result->fetch(PDO::FETCH_ASSOC)) { $id = $rows['id']; $title = $rows['title']; $link = $rows['link']; ?>