transBegin problem |
Hi
I don't know what I'm doing wrong. Without the transaction, the code works correctly. With the transaction, there is an error. pg_affected_rows(): Argument #1 ($result) must be of type PgSql\Result, bool given [url=https://www.duckduckgo.com/?q=TypeError+pg_affected_rows%28%29%3A+Argument+%231+%28%24result%29+must+be+of+type+PgSql%5CResult%2C+bool+given][/url] Code: public function test2() name => null - artificial invocation of an incorrect SQL query. Another issue is that if($query->insertBatch($toInsert) === false) never returns false. Or I don't know what needs to happen for this if statement to be satisfied.
Looks like a bug. When the query fails, the resultID is set to false automatically. You can officially report it here: https://github.com/codeigniter4/CodeIgniter4/issues
|
Welcome Guest, Not a member yet? Register Sign In |