Jump to content

unsigned character type


simpli

Recommended Posts

Hi all,

I have a primary key field that I designed as an unsigned, auto-increment integer. I did that because I figure I would get a wider range of number without needing a bigger data type. When I'm in phpMyadmin however, if I am adding a row of data directly on my table and I click on that field I have a drop down list where I have a negative AND a positive version of whatever number happens to already be in my table. For instance if in my table I had rows with the ids 40, 41 and 42, in the dropdown menu I would have choices of -40, -41, -42, 40, 41, 42. I find this a weird behaviour and I am now wondering if I did well to go with an unsigned type. Should I just stick with a double or a plain integer?

 

Is my reasoning that an unsigned int would give me more numbers for the same space wrong?

 

Thanks for clarifying.

JR

Link to comment
Share on other sites

What it actually does ( I just found out) is give me a choice from the table I am linked through referential integrity. It is in this table that the ids are 40, and 41. I guess it's giving me then the choice to enter -40,-41, 40 and 41 as they are equal the unsigned value. I'm just not sure I understand why. If the type is unsigned, shouldn't I just have 40 and 41?

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.