dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
1751

aagmailcom
@113.193.186.x

aagmailcom

Anon

When Inserting into table it stores some garbage values

Whenever I am inserting data into mysql database wiht below insert query then query runs successfully but when I check the data from database then it show some other values rather than the original values whatever I have inserted through the query . I use PHP and MySQL to execute the insert query. Please if anyone have any solution then please help me to resolve this problem.

My Code is :

$conn = mysql_connect('localhost','root','asterisk') or die("Cannot Connect with Databse") ; //connect with database mysql_selectdb('adore3', $conn) or die("Cannot Select the Database ") ;//select database

$query_insert="INSERT INTO cc_transfer VALUES ('', '528', '258', '1', '2012-5-5 4:4:4','5555555558888888','99999994444444',0);"; $r = mysql_query($query_insert); if($r) { echo "Inserted";

} ?>

But when I check the data then I don't found the values 5555555558888888 and 99999994444444 , there are some garbage values in both field 2147483647.

Please someone help me to remove this.

lunarPlexus
Nothin' Up Muh Sleeve
Premium Member
join:2003-02-08
Chicago, IL

lunarPlexus

Premium Member

That number is the maximum value for an int field. Change to bigint. You have the values in quotes though, so maybe they shouldn't be numeric at all?
dave
Premium Member
join:2000-05-04
not in ohio

1 recommendation

dave to aagmailcom

Premium Member

to aagmailcom
OT: 2147483647 is one of those numbers that programmers need to be able to recognize on sight. Once you recognize that it's the largest signed integer that fits in 32 bits, the rest of the problem becomes much simpler to understand.

Steve
I know your IP address

join:2001-03-10
Tustin, CA

1 recommendation

Steve

said by dave:

OT: 2147483647 is one of those numbers that programmers need to be able to recognize on sight. Once you recognize that it's the largest signed integer that fits in 32 bits, the rest of the problem becomes much simpler to understand.

2147483647 is the new 255
dave
Premium Member
join:2000-05-04
not in ohio

1 recommendation

dave

Premium Member

Actually, 4294967295 is the new 255.

2147483647 is the new 127.

sbconslt
join:2009-07-28
Los Angeles, CA

sbconslt

Member

Actually, 2147483647 is the new 32767.

4294967295 is the new 65535.

lunarPlexus
Nothin' Up Muh Sleeve
Premium Member
join:2003-02-08
Chicago, IL

lunarPlexus to aagmailcom

Premium Member

to aagmailcom
I guess we'll never see the OP again. This thread delivers max(humor) though.
dave
Premium Member
join:2000-05-04
not in ohio

dave to sbconslt

Premium Member

to sbconslt
Actually, 1,114,111 is the new 127.
said by www.unicode.org :

In the Unicode Standard, the codespace consists of the integers from 0 to 10FFFF (base 16), comprising 1,114,112 code points available for assigning the repertoire of abstract characters.