470,833 Members | 1,537 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Default 2147483647

Hi all,

I am doing portal for storing info of visitors.it is working well
too.but my prob is with mysql..when i entered infoa bt thier phone
numbers ,fax or mobile numbers,soemtimes it is storing 2147483547
instead of given number or default null.can u tell me the reason and
solution for it.

Thanks alot,

Faree.

Oct 25 '05 #1
7 3527
Faree wrote:
Hi all,

I am doing portal for storing info of visitors.it is working well
too.but my prob is with mysql..when i entered infoa bt thier phone
numbers ,fax or mobile numbers,soemtimes it is storing 2147483547
instead of given number or default null.can u tell me the reason and
solution for it.


A bit more information would be helpful, like the actual query you're
using.

But my guess would be that you're storing the information in a numeric
column type.

--
Oli

Oct 25 '05 #2
yes i am storign that value in a int type column.

Thanks
faree

Oct 25 '05 #3
Faree wrote:
yes i am storign that value in a int type column.


Well that's your problem then.

If you insert 001234 into an int type, it stores 1234, because that's
the integer value.

You'll want to use a character-based type, e.g. VARCHAR(x).

--
Oli

Oct 25 '05 #4

Oli Filth wrote:
Faree wrote:
yes i am storign that value in a int type column.


Well that's your problem then.

If you insert 001234 into an int type, it stores 1234, because that's
the integer value.

You'll want to use a character-based type, e.g. VARCHAR(x).

--
Oli


No Oli..

My problem was when i store actual phone number like 234567
...then also it is storign this number.Thanks for the quick reply.

Regards,
Faree

Oct 25 '05 #5
Faree wrote:
Hi all,

I am doing portal for storing info of visitors.it is working well
too.but my prob is with mysql..when i entered infoa bt thier phone
numbers ,fax or mobile numbers,soemtimes it is storing 2147483547
instead of given number or default null.can u tell me the reason and
solution for it.


2147483647 is the maximum value for a signed integer, as per the MySQL
manual.
http://dev.mysql.com/doc/refman/5.0/...ric-types.html

I'd choose a different field type, or at least one that can account for
larger numbers.

--
Kim Andrť AkerÝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Oct 25 '05 #6
Now my probelm solved.Thnaks for btoh of u Oli and Kim.Thanks for u r
quick response.

Regards,

Faree

Oct 25 '05 #7
A waste of electrons? You decide, but Message-ID:
<11**********************@g47g2000cwa.googlegroups .com> from Oli Filth
contained the following:
If you insert 001234 into an int type, it stores 1234, because that's
the integer value.

You'll want to use a character-based type, e.g. VARCHAR(x).


I wish I had a £ for every time a student had made that mistake :-}

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Oct 26 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by earl | last post: by
reply views Thread by inquirydog | last post: by
15 posts views Thread by A | last post: by
4 posts views Thread by Steven T. Hatton | last post: by
6 posts views Thread by Jack Wasserstein | last post: by
74 posts views Thread by Zytan | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.