gideonleroux
Založený: 14.09.2006
Príspevky: 7
Zaslal: 2006-09-14 22:59
Návrat hore
Odpovedať s citátom
|
example
field1 (user editable)
- (minus) field2 (user editable)
= (equals) field3 (this value must be auto generated)
or
field1 (user editable)
+ (plus/sum) field2 (user editable)
= (equals) field3 (this value must be auto generated)
the user can only input data in fields 1 and 2
the question is how do i do basic add/sum or subtract with this tool?
i am a novice whith this stuff please help many thanks
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-09-16 22:51
Návrat hore
Odpovedať s citátom
|
create a new $opts['ffd']['dummy_field'] with 'sql' col1+col2 and options VLF (no add and change).
|
gideonleroux
Založený: 14.09.2006
Príspevky: 7
Zaslal: 2006-09-18 22:19
Návrat hore
Odpovedať s citátom
|
| michal Napísal: |
| create a new $opts['ffd']['dummy_field'] with 'sql' col1+col2 and options VLF (no add and change). |
afraid i dont understand your syntax
lets say i have this:
$opts['fdd']['User1'] = array(
'name' => 'User1',
'select' => 'T',
'maxlen' => 11,
'sort' => true
);
$opts['fdd']['User2'] = array(
'name' => 'User2',
'select' => 'T',
'maxlen' => 11,
'sort' => true
);
$opts['fdd']['User3'] = array(
'name' => 'User3',
'select' => 'T',
'maxlen' => 11,
'sort' => true
i want to have the number that is in 'user1' added to the number in 'user2' and dislpayed in 'user3'
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-09-19 09:42
Návrat hore
Odpovedať s citátom
|
$opts['fdd']['User3']['sql'] = 'User1+User2';
|
gideonleroux
Založený: 14.09.2006
Príspevky: 7
Zaslal: 2006-09-19 10:40
Návrat hore
Odpovedať s citátom
|
| michal Napísal: |
| $opts['fdd']['User3']['sql'] = 'User1+User2'; |
GREAT IT WORKS! THANKS A MIL!
sorry fot the simple questions but
what is the syntax for subtracting col1 from col2
or dividing, or multiplying, or do you know where i can read more about the syntax?
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2006-09-19 12:10
Návrat hore
Odpovedať s citátom
|
http://dev.mysql.com/doc/refman/4.1/en/functions.html
|
gideonleroux
Založený: 14.09.2006
Príspevky: 7
Zaslal: 2006-09-19 13:05
Návrat hore
Odpovedať s citátom
|
Thank you!
|
Sherzzo
Založený: 03.06.2008
Príspevky: 2
Zaslal: 2008-06-03 20:18
Návrat hore
Odpovedať s citátom
|
$opts['fdd']['CostPerSet'] = array(
'name' => 'Cost/Set',
'select' => 'T',
'maxlen' => 21,
'sort' => true
);
$opts['fdd']['Discount'] = array(
'name' => 'Disc.',
'select' => 'T',
'maxlen' => 7,
'sort' => true
);
$opts['fdd']['CostPerSet`+`PMEtable0`.`Discount'] = array(
'name' => 'DiscountTotal',
'select' => 'T',
'maxlen' => 25,
'sort' => true
);
|
Sherzzo
Založený: 03.06.2008
Príspevky: 2
Zaslal: 2008-06-03 20:27
Návrat hore
Odpovedať s citátom
|
Or try this injection
| Kód: |
$opts['fdd']['NumSetsOrdered`*`PMEtable0`.`CostPerSet`-`PMEtable0`.`NumSetsOrdered`*`PMEtable0`.`CostPerSet`*`PMEtable0`.`Discount'] = array(
'name' => 'TotalPOAmount',
'select' => 'T',
'maxlen' => 25,
'sort' => true,
'input' => 'R'
);
|
|
|
Odoslať novú tému
Odpovedať na tému
|