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

a bug about set() #325

Closed
startbbs opened this issue Dec 10, 2016 · 2 comments
Closed

a bug about set() #325

startbbs opened this issue Dec 10, 2016 · 2 comments

Comments

@startbbs
Copy link

startbbs commented Dec 10, 2016

here I use
$db->table('user')->set('item_num','item_num+1',false)->where('id',1)->update();
the value of item_num in mysql become "0"

the above Executes:
UPDATE lb_userSET item_num = 'item_num+1' WHEREid = '1'

but when I use the follow code
UPDATE lb_userSET item_num = item_num+1 WHEREid = '1'

it works well.

I guess the third param($escape) might be a bug. please test, thanks.

@jim-parry
Copy link
Contributor

jim-parry commented Dec 10, 2016

If this is a bug, raise the issue here, but you don't also have to cross-post it on the forum.
If you don't know if it is a bug, then bring it up on the forum for feedback and/or confirmation, before raising it as an issue.

@lonnieezell
Copy link
Member

I will definitely check on that but you can use the increment and decrement methods and not worry about it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants