query($query); } /** * @param $string * @param mysqli $mysqli * @return string * @deprecated */ function mysql_real_escape_string($string, mysqli $mysqli = null) { return getLinkIdentifier($mysqli)->escape_string($string); } /** * @param mysqli_result $result * @return bool|array * @deprecated */ function mysql_fetch_assoc(mysqli_result $result) { $result = $result->fetch_assoc(); if ($result === null) { $result = false; } return $result; } /** * @param mysqli_result $result * @return bool|int * @deprecated */ function mysql_num_rows(mysqli_result $result) { $result = $result->num_rows; if ($result === null) { $result = false; } return $result; } /** * @param mysqli_result $result * @param $result_type * @return void * @deprecated */ function mysql_fetch_array(mysqli_result $result, $result_type = MYSQL_BOTH) { return mysqli_fetch_array($result, $result_type); } /** * Get the ID generated in the last query * * @param null $mysqli * @return int|string * @deprecated */ function mysql_insert_id(mysqli $mysqli = null) { return mysqli_insert_id(getLinkIdentifier($mysqli)); } /** * Get result data * * @param $result * @param $row * @param int $field * @return mixed * @deprecated */ function mysql_result($result, $row, $field = 0) { $result->data_seek($row); $row = $result->fetch_array(); if (!isset($row[$field])) { return false; } return $row[$field]; } }