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
Updating with where Condition. #1012
Comments
if you do your statement in pure mysql (ie: using phpmyadmin per example), you'll find that the datas aren't updated. In my case when i do an update, i always pass the date (Y/m/d H:i:s) in a field named 'date_modified' so it's always update. In your case it could be :
Hope that's help. |
Hi @tayyab82977, for me @unikoca solution is the proper way to do it even in the case date_updated field would have no other interest for you. It's that or a field with random data in it, at least update date have an interest and is nice to have. |
Information
Describe the Problem
User table is not updating with a return false.
Because in the database status is already 1.
If the update input is the same as the database it is returning false without reading where condition.
It makes where condition useless.
Detail Code
Expected output
The update should be happening on the USER table because in where condition I have put status not equals 2.
Condition it should reach only with where mainly not the selection.
The text was updated successfully, but these errors were encountered: