[Pugged] mysql

Angie Tollerson ciapug@ciapug.org
Wed, 22 Jan 2003 14:08:51 -0600


Dave,
Can you post for us the sql build of your table structure?
Angie

Angie Tollerson
Alliance Technologies Web Programmer
(515) 245-7628
tollerson@alliancetechnologies.net
>>> dave@58ghz.net 01/22/03 13:48 PM >>>

I can do that manually from mysql and it works.  However, the next time
my application does an insert into that table, every AMT field in the
table becomes a negative value. It's wierd.

If you're curious, here's what the insert code looks like:

$connection = db_connect("Couldn't Connect to DB");
$SQL = "INSERT INTO foo (LHP,CKN,CKD,VLN,AMT,SQN,TNT,WAMT,PPC,UVC)
	VALUES
(\"$LHP\",\"$CKN\",\"$CKD\",\"$VLN\",\"$AMT\",\"$SQN\",\"$TNT\",\"$WAMT\",
\"$PPC\",\"$UVC\") ";
$result= mysql_query($SQL,$connection) or die (mysql_error());



I'm gonna try goggling a little a more...



Also doing
On Wed, 2003-01-22 at 12:30, Tim Perdue wrote:
> Dave J. Hala Jr. wrote:
> > I'm running mysql on RH8.0
> > 
> > I've got a table that has a field called AMT that is decimal(10,2)
This
> > field currently has a value of -6500.00 If I do an update, no matter
> > what value I stick in here mysql makes it negative.
> > 
> > I did an insert and created and new record in this table, during
that
> > insert I put the value 100 in the AMT field. Unfortunately it stores
> > that value as -100 
> > 
> > It seems like mysql has decided that EVERY value in this field in
this
> > table should be negative no matter what. 
> > 
> > Anyone got any ideas?
> 
> have you tried something like:
> 
> update foo set amt = (amt*-1)
> 
> just to see what it would do?
> 
> I've had fields always be Positive, since they were unsigned, but all 
> negative is odd.
> 
> Tim
> 
> _______________________________________________
> Ciapug mailing list
> Ciapug@ciapug.org
> http://cialug.org/mailman/listinfo/ciapug
-- 

"...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and
the Ugly)"

OSIS
Dave J. Hala Jr.
641.485.1606


_______________________________________________
Ciapug mailing list
Ciapug@ciapug.org
http://cialug.org/mailman/listinfo/ciapug