(PHP 5, PHP 7, PHP 8)
mysqli::real_query -- mysqli_real_query — Executa uma consulta SQL
Estilo orientado à objeto
$query
): boolEstilo procedural
Executa uma única consulta no banco de dados cujo resultado pode ser recuperado ou armazenado usando as funções mysqli_store_result() ou mysqli_use_result().
Para determinar se uma determinada consulta deve retornar um conjunto de resultados ou não, consulte mysqli_field_count().
link
Somente no estilo procedural: Um recurso link retornado por mysqli_connect() ou mysqli_init()
query
A string de consulta.
If the query contains any variable input then parameterized prepared statements should be used instead. Alternatively, the data must be properly formatted and all strings must be escaped using the mysqli_real_escape_string() function.
Retorna true
em caso de sucesso ou false
em caso de falha.
If mysqli error reporting is enabled (MYSQLI_REPORT_ERROR
) and the requested operation fails,
a warning is generated. If, in addition, the mode is set to MYSQLI_REPORT_STRICT
,
a mysqli_sql_exception is thrown instead.