The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Request for help:PHP and MySQL by talon0720 2003-02-09 11:57:38
I'm trying to write an app in PHP to interface with a MySQL db and I'm having the following problem.

I grab the price of an item from the db, multiply by the quantity, and try to insert that value into a field.
It always comes out to be 0. I've tried explicitly setting the type to float before and after the calculation, I've tried converting the darned thing back to a float, I've tried changing the field in the db to a varchar to see if its just not getting changed to a float and is staying a string. Nothing seems to work. If anyone has dealt with this sort of thing I would appreciate any help possible. Please email me at bruce@castle-computer.NOSPAM.com (of course remove the NOSPAM) and I'll give you whatever details you need to help me figure this out. I'm sure its something simple that I should see, but my head still hurts. Please help me to stop bangin my head on the wall.
[ Reply ]
  let me guess...... by mhiper32003-02-09 12:33:03
    nope by talon07202003-02-09 13:57:34
      Perhaps PHP somehow thinks it's a string by IByte2006-11-19 12:55:59
        Thanks by talon07202003-02-09 16:02:21
      if you echo the query... by mhiper32003-02-09 16:15:01
        Thanks by talon07202003-02-09 17:59:19

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)