(PHP 5, PHP 7, PHP 8)
mysqli::real_query -- mysqli_real_query — Ejecuta una consulta SQL
Estilo orientado a objetos
Estilo por procedimientos
Ejecuta una sola consulta en la conexión a la base de datos representada
por el parámetro link
cuyo resultado puede ser
recuperado o almacenado utilizando las funciones mysqli_store_result()
o mysqli_use_result().
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.
Para determinar si una consulta dada debería haber devuelto un conjunto de resultados o no, consulte la función mysqli_field_count().
link
Sólo estilo por procediminetos: Un identificador de enlace devuelto por mysqli_connect() o mysqli_init()
query
La consulta string.
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.