[Pugged] mysql

ciapug@ciapug.org ciapug@ciapug.org
Wed, 22 Jan 2003 20:01:29 -0000


"Dave J. Hala Jr." <dave@58ghz.net> said:

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

Any chance you've got a default value or something that's messing it
up? Try doing a mysqldump of the database and look at the code it
generates for "create table foo...".

-dc