[Pugged] mysql
Dave J. Hala Jr.
ciapug@ciapug.org
22 Jan 2003 14:22:53 -0600
Yeah, I know.. I can't figure it out, but I *CAN* make it happen
consistently....I guess that's a *good part*!!!
On Wed, 2003-01-22 at 14:12, Angie Tollerson wrote:
> LOL, nevermind you just did it.
> Here's what confused me, from what you said earlier..a simple INSERT
> statement is somehow updating previous records. Is that even possible?
> No matter whether your code, table, defaults, or the MOON is incorrect,
> an insert statement should not be updating all other records in the
> table.
> Angie
>
> Angie Tollerson
> Alliance Technologies Web Programmer
> (515) 245-7628
> tollerson@alliancetechnologies.net
> >>> tollerson@alliancetechnologies.net 01/22/03 14:10 PM >>>
> 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
>
> _______________________________________________
> Ciapug mailing list
> Ciapug@ciapug.org
> http://cialug.org/mailman/listinfo/ciapug
>
> _______________________________________________
> 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