You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
MariaDB 10.1.31
What happened?
I get builder in my Model (I do not extend CodeIgniter Model) assigned to property like that: $this->builder = $this->dbConn->table($this->getTable() . ' as t'); getTable() return set table name.
When I produce queries for in eg. select, they are produced nicely.
When I want to produce insert query, builder use table alias I provided and produce query like this:
INSERT INTO `users` as `t` (fields) VALUES (values)
Steps to Reproduce
Create builder object with passed table alias and try to produce insert query.
Expected Output
INSERT INTO `users` (fields) VALUES (values)
Anything else?
I do not extend CodeIgniter Model.
The text was updated successfully, but these errors were encountered:
pawelkg
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Nov 21, 2021
kenjis
changed the title
Bug: Invalid INSERT query when builder use table alias
Bug: [QueryBuilder] Invalid INSERT query when builder use table alias
Apr 2, 2022
PHP Version
8.0
CodeIgniter4 Version
4,1,5
CodeIgniter4 Installation Method
Composer (as dependency to an existing project)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
MariaDB 10.1.31
What happened?
I get builder in my Model (I do not extend CodeIgniter Model) assigned to property like that:
$this->builder = $this->dbConn->table($this->getTable() . ' as t');
getTable()
return set table name.When I produce queries for in eg. select, they are produced nicely.
When I want to produce insert query, builder use table alias I provided and produce query like this:
INSERT INTO `users` as `t` (fields) VALUES (values)
Steps to Reproduce
Create builder object with passed table alias and try to produce insert query.
Expected Output
INSERT INTO `users` (fields) VALUES (values)
Anything else?
I do not extend CodeIgniter Model.
The text was updated successfully, but these errors were encountered: