Running PHP 8. I have just upgraded CodeIgniter from 3.0.4 to 3.1.13.
Before the upgrade, the affected_rows() worked fine and gave me the correct quantity.
Now it just gives me a TypeError.
This is a little above my head but I've tried to understand the ODBC driver. I think it's because _execute() returns a boolean, but odbc_num_rows() crashes because it expects a resource.
Any suggestions to fix this?
_execute()was changed between your versions. If$this->odbc_resultisn't set you should get the same result as before. But ifodbc_num_rows()gets a boolean, then the query from before didn't worked, see line 227 ofCI_DB_odbc_driverwhere this method returnsfalsein case$this->odbc_result === FALSE. Fix it andaffected_rows()should work without a type error.