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
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.
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:
if you do your statement in pure mysql (ie: using phpmyadmin per example), you'll find that the datas aren't updated.
So it's not a problem with this library (if i understand your problem correctly).
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 :
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.
It will make your code work as needed :)
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: