0
이 선택 문을 사용할 수 있도록하려면이 오류와 함께 반환 된 페이지를 실행할 때 Call to undefined method mysqli_stmt::fetch_object()
.오류 : 정의되지 않은 메소드를 호출하십시오. mysqli_stmt :: fetch_object()
<?php
$id = escape($_GET['id']);
$records = array();
$results = $db->prepare("SELECT * FROM `bookings` WHERE id = ?");
$results->bind_param('i', $id);
if ($results->execute()) {
while ($row = $results->fetch_object()) {
$records[] = $row;
}
$results->free();
}
?>
가 그럼 난 이런 식으로 아래를 통해 루프 싶습니다 :
<?php foreach ($records as $data) {... ?>
을 내가 잘못 뭐하는 거지
이 내 문입니까?
사용 PDO에서 답을 복용 : 설명서를 확인하십시오. mysqli는 그것을 지원하지 않는다 – hek2mgl
http://stackoverflow.com/questions/5656676/fatal-error-call-to-undefined-method-mysqli-stmtfetch-array – slier