Documentation Home
MySQL PHP API
Download this Manual
PDF (US Ltr) - 2.4Mb
PDF (A4) - 2.4Mb


MySQL PHP API  /  ...  /  mysqli_stmt::__construct

3.9.7 mysqli_stmt::__construct

Copyright 1997-2021 the PHP Documentation Group.

  • mysqli_stmt::__construct

    Constructs a new mysqli_stmt object

Description

public mysqli_stmt::__construct(mysqli mysql,
                                string|null query= =null);

This method constructs a new mysqli_stmt object.

Parameters

link

A valid mysqli object.

query

The query, as a string. If this parameter is null, then the constructor behaves identically to mysqli_stmt_init, otherwise it behaves as per mysqli_prepare.

Changelog

VersionDescription
8.0.0query is now nullable.

See Also

mysqli_prepare
mysqli_stmt_init