Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Calculate field and try to store field in DB

phpMyEdit Features     Calculate field and try to store field in DB
Odoslať novú tému   Odpovedať na tému    
 
wverweij     Založený: 08.01.2013   Príspevky: 1  
Príspevok 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    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov