Re:You probably don’t need input type=“number”
by rickycook on Monday March 25, 2019 @01:49AM
(#19480548)
you increment your database ID for each row... 9-10 is natural for numbers but doesn’t flow for strings. making the number into a string is pointless because it always starts it’s life as a number
[ Parent
| on HN ]
Re:You probably don’t need input type=“number”
by yen223 on Monday March 25, 2019 @03:14AM
(#19480779)
What I find most of the time is that you only need IDs to be unique.
The fact that databases use auto-incrementing integers to ensure uniqueness is an implementation detail, and not a strictly necessary one (think UUIDs).
Re:You probably don’t need input type=“number”
by ryanbrunner on Monday March 25, 2019 @08:30AM
(#19481910)
Right, but I think the main point is if you're going to use auto-incrementation to provide values for your IDs, you might as well use numbers, since at that point you are doing math on them (one super simple operation of "+1", but math nonetheless.)