cm0002@lemmy.world to Technology@lemmy.worldEnglish · 22 hours agoLife isn't easy if your last name is 'Null' as it still breaks database entries the world overwww.pcgamer.comexternal-linkmessage-square49fedilinkarrow-up1123arrow-down12
arrow-up1121arrow-down1external-linkLife isn't easy if your last name is 'Null' as it still breaks database entries the world overwww.pcgamer.comcm0002@lemmy.world to Technology@lemmy.worldEnglish · 22 hours agomessage-square49fedilink
minus-squareChewbaccabra@lemmy.worldlinkfedilinkEnglisharrow-up35·14 hours agoNULL != ‘NULL’ How do devs make this mistake
minus-squareblackn1ght@feddit.uklinkfedilinkEnglisharrow-up15·edit-212 hours agoIt’s baffling to me. Maybe I’m just used to using “modern” frameworks, but the only way this could be an issue is if you literally check if the string value equals “null” and then replace it with a null value. lastName = lastName.ToUpper() == "NULL" ? null : lastName; Either that or the database has some bug where it’s converting a string value of “null” into a null.
minus-squareSlaxis@discuss.tchncs.delinkfedilinkEnglisharrow-up7·11 hours agoThat is something I’ve had to do on rare occasions because people set up and store info in stupid ways…
minus-squareGonzako@lemmy.worldlinkfedilinkEnglisharrow-up2·13 hours agoHow do devs make off by one mistakes.
NULL
!= ‘NULL’How do devs make this mistake
“True”
It’s baffling to me. Maybe I’m just used to using “modern” frameworks, but the only way this could be an issue is if you literally check if the string value equals “null” and then replace it with a null value.
lastName = lastName.ToUpper() == "NULL" ? null : lastName;
Either that or the database has some bug where it’s converting a string value of “null” into a
null
.That is something I’ve had to do on rare occasions because people set up and store info in stupid ways…
How do devs make off by one mistakes.