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

Model set $escape problem #1929

Closed
arkananta opened this issue Apr 9, 2019 · 3 comments
Closed

Model set $escape problem #1929

arkananta opened this issue Apr 9, 2019 · 3 comments
Labels
waiting for info Issues or pull requests that need further clarification from the author

Comments

@arkananta
Copy link

It's look like if I use more than one SET, I can't use different $escape value.

$this->set('tanggal_transaksi', $data['tanggal_transaksi'], true)->set('balance', 'balance + ' . $data['amount'], FALSE)->where('user_id',$data['user_id'])->update();

generate this query

UPDATE transaksi SET tanggal_transaksi = 2019-04-09, balance = balance + 0.1 WHERE user_id = '12'

In this case I need tanggal transaksi to be escaped, and balance are not esacpe

@jim-parry jim-parry added this to the 4.0.0-rc.2 milestone Sep 8, 2019
@jim-parry
Copy link
Contributor

Can you provide a more complete example please.
What do you expect the outcome to be above?
Where does different $escape values come into play?

@jim-parry jim-parry added the waiting for info Issues or pull requests that need further clarification from the author label Sep 17, 2019
@jim-parry jim-parry removed this from the 4.0.0-rc.2 milestone Sep 20, 2019
michalsn added a commit to michalsn/CodeIgniter4 that referenced this issue Oct 1, 2019
@michalsn
Copy link
Member

michalsn commented Oct 1, 2019

I couldn't reproduce it. But I added a test to make sure.

@MGatner
Copy link
Member

MGatner commented Aug 25, 2020

Michal's tests have proven consistent and this appears to have been a misunderstanding, or at least is no longer an issue.

@MGatner MGatner closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for info Issues or pull requests that need further clarification from the author
Projects
None yet
Development

No branches or pull requests

4 participants