Jump to content


Photo

Math operations on mysql data


  • Please log in to reply
2 replies to this topic

#1 ghgarcia

ghgarcia
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts
  • LocationFlorida

Posted 12 August 2006 - 12:24 PM

I have a mysql database table with several fields field1 is an int. field2 is a dec with 1 decimal point. My problem is that if the value in field2 is neg the results of adding field1 and field2 works correctly. However if the value in field2 is positive I get no result in the addition and no errors.  Any help would be greatly appreciated.

George
George

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 12 August 2006 - 02:56 PM

Could you give a more concrete example?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 ghgarcia

ghgarcia
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts
  • LocationFlorida

Posted 12 August 2006 - 06:49 PM

Thanks I think that I found the problem. It was in my PHP code. But thanks again for the fast response.

George
George




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users