site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
604
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


aagmailcom

@113.193.186.x

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
join:2003-02-08
Chicago, IL

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,MVM
join:2000-05-04
not in ohio
kudos:8

reply 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
Consultant
join:2001-03-10
Yorba Linda, CA
kudos:5

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,MVM
join:2000-05-04
not in ohio
kudos:8

Actually, 4294967295 is the new 255.

2147483647 is the new 127.



sbconslt

join:2009-07-28
Los Angeles, CA

Actually, 2147483647 is the new 32767.

4294967295 is the new 65535.



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

reply to aagmailcom
I guess we'll never see the OP again. This thread delivers max(humor) though.


dave
Premium,MVM
join:2000-05-04
not in ohio
kudos:8

reply 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.


Wednesday, 19-Jun 10:56:59 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics