mysqli_stmt::__construct
(PHP 5, PHP 7, PHP 8)
mysqli_stmt::__construct — 새로운 mysqli_stmt 객체를 생성합니다.
설명
mysqli_stmt::__construct(mysqli $mysql
, ?string $query = null)
이 메소드는 새로운 mysqli_stmt 객체를 생성합니다.
매개변수
link
- 유효한 mysqli 객체.
query
- 쿼리, 문자열. 이 매개변수가
null
이면 생성자는 mysqli_stmt_init()와 동일하게 동작하고, 그렇지 않으면 mysqli_prepare()에 따라 동작합니다.
변경 로그
버전 | 설명 |
---|---|
8.0.0 | query 는 이제 null을 허용합니다. |
기타
- mysqli_prepare() - 실행을 위해 SQL 문 준비
- mysqli_stmt_init() - 명령문을 초기화하고 mysqli_stmt_prepare와 함께 사용할 객체를 반환합니다.