List:General Discussion« Previous MessageNext Message »
From:Terry Riley Date:April 25 2003 10:18am
Subject:Re: DB Field Prepopulates with same every time...
View as plain text  

> I have a simple PHP script which handles a users profile.
> 
> There are 2 fields, postal_code SMALLINT (5), and phone_number INT(12).
> 
> Whenever I insert values into these fields or update values, they are
> saved as 32767, for the both of them.
> 
> I print out my SQL statement prior to inserting/updating, and sure
> enough, the values are what I input in my form BEFORE they go into the
> DB.  But the answer comes after they are inserted/updated.  All other
> columns are fine...
> 
> Any ideas?
> 

I presume you already have 32767 entries in that table? That is the 
maximum positive number that smallint can handle..... change it to 
mediumint or simply int.

Terry

Thread
DB Field Prepopulates with same every time...Jonathan Villa25 Apr
  • Re: DB Field Prepopulates with same every time...Stefan Hinz25 Apr
  • Re: DB Field Prepopulates with same every time...(Terry Riley)25 Apr