Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix added twice when I used method like in Builder #5917

Closed
patmartel opened this issue Apr 22, 2022 · 1 comment
Closed

Prefix added twice when I used method like in Builder #5917

patmartel opened this issue Apr 22, 2022 · 1 comment
Labels
duplicate Issue or pull request duplicates an already existing issue/pull request

Comments

@patmartel
Copy link

patmartel commented Apr 22, 2022

PHP Version

8.1

CodeIgniter4 Version

4.1.9

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MySql

What happened?

When I used method "like" in Builder , the db prefix is added twice

I join the error send.

The DB prefix is "applis_"

My code is :
$this->builder->like('clients.name', 'test');

mysqli_sql_exception #1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%test%
OR applis_``applis_clients.name LIKE '%test%' ESCAPE '!'

Steps to Reproduce

Create a DB config file with DBPrefix not empty
Create a request with builder
Add clause like

Expected Output

I expected a query result

Anything else?

No response

@patmartel patmartel added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 22, 2022
@iRedds
Copy link
Collaborator

iRedds commented Apr 22, 2022

Already fixed. #5778

@kenjis kenjis added duplicate Issue or pull request duplicates an already existing issue/pull request and removed bug Verified issues on the current code behavior or pull requests that will fix them labels Apr 22, 2022
@kenjis kenjis closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue or pull request duplicates an already existing issue/pull request
Projects
None yet
Development

No branches or pull requests

3 participants