[Pugged] mysql
Dave J. Hala Jr.
ciapug@ciapug.org
22 Jan 2003 14:07:55 -0600
I just changed the AMT to double type, no default and it still does the
same thing. Hmmm...
--
-- Table structure for table 'foo'
--
CREATE TABLE foo (
LHP char(1) default NULL,
CKN int(6) default NULL,
CKD date default NULL,
VLN varchar(36) default NULL,
AMT double default NULL,
SQN int(11) default NULL,
TNT char(3) default NULL,
id int(11) NOT NULL auto_increment,
WAMT varchar(128) default NULL,
PPC int(11) default NULL,
date_modified timestamp(14) NOT NULL,
UVC varchar(4) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
[d
On Wed, 2003-01-22 at 14:01, dave@visionary.com wrote:
> "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
>
> _______________________________________________
> 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