Jump to content

[SOLVED] Negative Numbers


Sideclef

Recommended Posts

depends on the code putting it in, but the quickest dead-stop way of doing so is by setting the column attribute to UNSIGNED.  this can be done through PMA or a MODIFY statement, but i would be wary in the case that you have pre-existing negative integers; not sure how MySQL would react if that was the case.

Link to comment
Share on other sites

UNSIGNED is fine; zerofill will add zeroes up to the field's length, and often just makes things more of a pain unless you need them for your specific application.

 

you can either set them to zero or take their absolute values - it sounds as though you would just want to set them to zero.

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.