Bug #61804 Simple multiplication problem ?
Submitted: 8 Jul 2011 21:43 Modified: 9 Jul 2011 1:08
Reporter: Sacha Schmitz Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:Apache/2.0.63 OS:MacOS (MAMP)
Assigned to: CPU Architecture:Any
Tags: computation, multiplication

[8 Jul 2011 21:43] Sacha Schmitz
Description:
Hello,

I'm using Drupal 6 with a module called CCK which uses another module called Computed Fields in order to be able to enter PHP code.

So for instance I want to calculate the wage of a worker which is based on the number of projects they have developed. So for instance, if the wage per project is 25$ (fixed in the line of code), and that the number of project developed is within a table called "field_code_developed".

Then : the result of the wage are displayed in a table called "field_wage_per_code" for which i have to enter the following code 

$node_field[0]['value'] = $node->field_code_developed[0]['value']*25;

So I did it for a huge number of operations, but for one operation it doesn't work at all since it gives me an outlier number. For instance, if the number of code is 2, it gives 55. I tried other values and it always gave me strange results (near from the expected results)...

Is there any known problems about (very) simple computations such a multiplication of two integers ?

What tells me that the problem doesn't come from Drupal or the modules is that i hadn't any problem since the beginning of the website.

If you have any idea about the problem, please tell me as soon as possible !

Thank you all !

How to repeat:
Installing Drupal 6 with the two modules mentionned above.
[9 Jul 2011 1:08] MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.