php-mysql-mysqli-wrapper
php-mysql-mysqli-wrapper copied to clipboard
Quote from the [manual](https://www.php.net/manual/en/mysqli-driver.report-mode.php): > As of PHP 8.1.0, the default setting is `MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT`. > Previously, it was `MYSQLI_REPORT_OFF`. Without this commit every failed query will throw a...
`mysqli_fetch_array` returns `NULL` when there are no more results, but `mysql_fetch_array` returned `FALSE`. To fix, change line 249 from `return mysqli_fetch_array($result, $result_type);` to `return mysqli_fetch_array($result, $result_type) ?? FALSE;`
The global $link was a little generic, and I'd be worried it would be overwritten in a sprawling codebase. Converted it (and the global_link_identifier) function to a static class property/function....
check this changes if $field_offset== 0 mysqli_field_seek is not call and mysqli_fetch_field fail ``` function mysql_fetch_field(mysqli_result $result, $field_offset = -1) { if ($field_offset>=0) { mysqli_field_seek($result, $field_offset); } $foo = mysqli_fetch_field($result);...
_Whole Error:_ > Fatal error: Uncaught TypeError: Argument 1 passed to mysql_free_result() must be an instance of mysqli_result, boolean given, called in /home/httpd/[...]/functions.php on line 478 and defined in /home/httpd/[...]/mysql.php:284...
Hi, Your wrapper is really helpfull. Thanks a lot! 👍 Andreas