Current location: Hot Scripts Forums » Other Discussions » Database » number converted


number converted

Reply
  #1 (permalink)  
Old 11-23-09, 06:52 AM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 706
Thanks: 0
Thanked 0 Times in 0 Posts
number converted

Hi there..

I got a value (2009112313475464) wich I want to store in my DB.
The DB-field is set as a INT(16) field.

Somehow the value of 2009112313475464 is stored as 2147483647
but I got no clue on this..

this is my php-code:

PHP Code:

$numbr rand(1,99);

$datum date("YmdHis");

$uniek $datum.$numbr;

mysql_query("INSERT INTO producten (uniek) VALUES('$uniek') ") or die(mysql_error()); 
Reply With Quote
  #2 (permalink)  
Old 11-23-09, 07:25 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
Try using BIGINT instead of INT.
__________________
Jerry Broughton
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to pass this class Please Help! Negative6 Everything Java 1 05-03-07 06:55 AM
Generate unique number then store phpfreek Database 18 10-22-06 04:53 AM
Perfect number... Argo_Jeude C/C++ 1 07-14-05 02:35 PM


All times are GMT -5. The time now is 05:09 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.