Jump to content


Photo

jumbled number


  • Please log in to reply
2 replies to this topic

#1 mATOK

mATOK
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts
  • LocationToronto, Ontario

Posted 11 October 2006 - 06:48 PM

hey there

I grab input from a form

<tr><th>Phone</th><td><input type="text" name="phone" size="10" /></td></tr>

and I store it in a db - telnum INT -

but when I retreive the info it's all jumbled and aren't even the numbers I am keying in

e.g. 1234567891 returns 1234567891 but 4164882073 returns 2147483647
any idea as to what could cause this?
"Not everything that counts can be counted, and not everything that can be counted counts."

W3 Web Tutorials | Check Your html | CSS layout techniques | ALA | Zen Garden | CSS Links

Navs with flavor | CSS Playground | CSS boxes

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 11 October 2006 - 07:30 PM

The number 2147483647 is the largest number that can be stored in a 32 byte integer. Change the field type to varchar(10).

Ken

#3 mATOK

mATOK
  • Members
  • PipPipPip
  • Advanced Member
  • 84 posts
  • LocationToronto, Ontario

Posted 11 October 2006 - 07:48 PM

Thanx! I changed to a double  :)
"Not everything that counts can be counted, and not everything that can be counted counts."

W3 Web Tutorials | Check Your html | CSS layout techniques | ALA | Zen Garden | CSS Links

Navs with flavor | CSS Playground | CSS boxes




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users