transStatus error |
Hi
What am I doing wrong? PHP Code: $edb = \Config\Database::connect(); \Database\BasePreparedQuery.php at line 141
It looks like the issue is caused by an incorrect query: https://codeigniter.com/user_guide/datab...d-bindings
On top of that, there may be a bug in CodeIgniter. For now, I recommend skipping the transStart() and transComplete() methods so you can focus on resolving the query issue first.
michalsn.dev - mostly about CodeIgniter
(06-16-2025, 11:27 AM)okatse Wrote: Hi For this: I also had problems with CodeIgniter 4 when combining prepare() + PostgreSQL + transactions. Instead of using prepare() use parameterized queries directly with query() or table() something like: Code: $edb = \Config\Database::connect(); ? is used for positional binding — this works well in PostgreSQL and avoids the internal issue with $transStatus I have not tested above but hope that may help.
A fix has already been prepared and will be included in an upcoming release.
The error occurred due to an issue in the code. Here's the corrected version: PHP Code: $edb = \Config\Database::connect(); Thank you for posting about this. It helped us identify and fix a bug.
michalsn.dev - mostly about CodeIgniter
Thank you for your quick response.
Yes, I confirm that if the SQL query is incorrect, an error message is displayed "Connection::$transStatus" |
Welcome Guest, Not a member yet? Register Sign In |