
mysqli_stmt::data_seek 함수는 mysqli_stmt 객체의 커서를 특정 위치로 이동시키는 함수입니다.
커서를 5 번째 위치로 이동시키는 코드는 다음과 같습니다.
#hostingforum.kr
php
$stmt->data_seek(5);
mysqli_stmt::data_seek 함수는 결과셋의 커서를 이동할 때 데이터의 중복을 방지하는 기능을 제공하지 않습니다. 결과셋의 커서를 이동하면 이전에 읽은 데이터는 제거되지 않습니다.
만약 데이터의 중복을 방지해야 하는 경우, mysqli_stmt::free_result 함수를 사용하여 결과셋을 해제하고 다시 쿼리를 실행해야 합니다.
#hostingforum.kr
php
$stmt->free_result();
$stmt->execute();
2025-08-14 11:20