Page 1 of 1

Suggestions on MemberIds and ProductIds

Posted: Sun Jul 03, 2005 4:02 am
by raghavan20
I have designed a couple of websites where in,
MemberIds , I use prefix 'M' example ids: M1001
ProductIds, I use prefix 'P' example ids: P1001

do u think its good to use like this or just go for autocomplete?
Because mine is not scalable and I am putting extra code of no use?
But do u think autocomplete would never come up with a problem?

I welcome all ur comments.

Posted: Sun Jul 03, 2005 6:39 am
by Sphen001
Well, when I do stuff like that, I use the Auto Increment feature of MySQL. It works great for me. I also know of some people that just $id + 1. Whatever works for you is the best. As long as it's not slowing down your pages a lot, go for it.

Sphen001

Posted: Sun Jul 03, 2005 8:19 am
by timvw
From the point of database normalization: The prefixes 'M' and 'P' are completely redundant.