wverweij
Založený: 08.01.2013
Príspevky: 1
Zaslal: 2013-01-08 23:32
Návrat hore
Odpovedať s citátom
|
2 fields used for calculate the Body Mass Index.
Field 'Lengte' is the Lenght and in field BMI I try to store some calculation with the Lengte field in the BMI field. In this example the calculaton is Lengte x Lengte.
If used only Lengte (without doing some math) then its working ok. In case I try to perform some calculation with Lengte and store it in the BMI field then result always become 0.00.
What I'm doing wrong?
$opts['fdd']['Lengte'] = array(
'name' => 'Lengte in CM',
'select' => 'T',
'maxlen' => 11,
'sort' => true
);
$opts['fdd']['BMI'] = array(
'name' => 'Body Mass Index Factor',
'select' => 'T',
'maxlen' => 21,
'sort' => true
);
// works ok
$ln = Lengte;
$opts['fdd']['BMI']['sqlw'] = '$ln';
// error: result is 0.00
$ln = (Lengte*Lengte);
$opts['fdd']['BMI']['sqlw'] = '$ln';
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|