manny, the reason why i numbered the ids is because:
When u are handling customers, you dont want to have some arbitrary number identifying a customer - it doesnt help when you are trying to find data on them. Say if Jeffrey Parker was a customer, i would give him an ID of JEFPAR (first three letters of given and family name) followed by a number, so say he is the first JEFPAR so he would get JEFPAR1. Now lets say a Jefferson Parkinson comes along, now i would have to give him JEFPAR as well, that wouldnt work if i didnt number the IDs, so Jefferson gets ID JEFPAR2.
by knowing that i gave customers IDs (i dont go into the database and find out what to give them - i write an algorithm to give me the ID + number), it makes it so much easier when, say, Jeffrey comes back to the shop, i can just look up JEFPAR (but of course i have search functions that allow you to search by given name, family name, phone number, and ID).
As you said:
QUOTE
why the f**k is the ID not just a number? IF this is a database key, you screwed yourself royally dude.
believe me, I had auto incrementing numbers as the primary key at first, but it is just absolutely pointless since i dont use it to identify customers with ease.
QUOTE
And in a 3rd Normal Form database, you should never have multiple different customer id's that are the same person..... you have ONE customer that buys MANY things.
u misunderstand me, i dont have multiple different customer ids that are the same person, one person = one id, and OF COURSE i have ONE customer that buys MANY things.... im quite insulted that you would think that i would think otherwise :P why i oughta slap u manny
QUOTE
trim the ID column... if it is only 'F' then the length will be one. I still think that is stupid though.
its not that easy, yes u know that the ID that you WANT to add is a length of 1, but how do you know if there are any existing 'F's in the database already? of course you could do a check to see if there are any IDs in the database that are only 'F' minus the trailing numbers, BUT what if the ID actually consists of numbers originally?? as i said previously, F123 could be the original ID followed by a number to become F1231, F1232, F1233, F1234, F1235 and so on... so if you just take the numbers off, you would get many IDs that conflict with each other... F F F F F and F etc....
but yes anyway, ive already fixed my own dilemma with my own stated method as before. lots of additions to the code because of one extra column in the table, but dont have the time to sit n think of a better way.