SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 14th, 2000, 12:53 PM
TenBaseTwo TenBaseTwo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: USA,OH
Posts: 2 TenBaseTwo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have a table where I place a large integer: for example: 200007014134747 Now it looks algood, until 24hours plus, when I check it it is listed at some -1003045025 (number varies but always this length of digits. I have checked and nothing external is changing this field. Is their some bug in MySQL which I am unaware?

thanks

Reply With Quote
  #2  
Old July 15th, 2000, 09:51 AM
woodgnome woodgnome is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 29 woodgnome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 43 sec
Reputation Power: 0
What's the column type that you are storing the integer in?

Reply With Quote
  #3  
Old July 15th, 2000, 08:39 PM
jcbell jcbell is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 14 jcbell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You may not have declared your column type properly.
Declare it as BIGINT 10 UNSIGNED

You M wasn't big enough or too big for mySQLL
or more probably you declared it as signed with not enough digits and the next time you called it up, mySQL converted it to its modulo value for the number of digits you specified

See: http://www.mysql.com/documentation/...l#Numeric_types

M is the number of digits

BIGINT[(M)] [UNSIGNED] [ZEROFILL]
A large integer. The signed range is -9223372036854775808 to 9223372036854775807.
The unsigned range is 0 to 18446744073709551615. Note that all arithmetic is done using
signed BIGINT or DOUBLE values, so you shouldn't use unsigned big integers larger than
9223372036854775807 (63 bits) except with bit functions! Note that -, + and * will use
BIGINT arithmetic when both arguments are INTEGER values! This means that if you multiply
two big integers (or results from functions that return integers) you may get unexpected results
if the result is larger than 9223372036854775807.

jcbell@magnolia.net

------------------

Reply With Quote
  #4  
Old July 17th, 2000, 09:21 AM
TenBaseTwo TenBaseTwo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: USA,OH
Posts: 2 TenBaseTwo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I set the field for bigint(20), I did not specify signed or unsigned, though my number is fixed length at 14-digits (i.e. 20000717101812).

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Help, odd field change is occuring


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway