Using math functions DW8, MySQL...

Hey Guys!!!
I know i've probably asked this question a couple of times
but i just can't get the hang of it.
Here i've got a text field. In this text field i want to
multiply values from 2 fields in my database(mysql) and display.
(ie field1 * field2 = result displays which should display in
the text field). HOW DO I DO THIS??
PS
My database connection is working fine through DW8, but what
commends do i put in the dynamicsource to have it multiply the said
fields.
PLEASE HELP!

>>
Gosh you've got some memory
>>
Lol, no, my memory as such is in shambles as always -- but as
I´ve established a local testing directory named "ramsthedon",
it´s easy to track my previous stuff ;-)
>>
Where do i go from there to input the SQL code you have
generously assisted me with?
>>
at times using DW´s "visual interfaces" isn´t that
appropriate for custom-built code -- that said, DW comes with a
substantial list of built-in "data bindings", but apart from that
isn´t aware of manually introduced data preprocessing like
your $result - variable.
When being in "Design" view, you´ll just need to click
on the respective form field, then switch the page to "Code", and
copy/paste the <?php echo $result; ?> fragment into the
field´s value="" parameter -- after pasting you should see
this result:
value="<?php echo $result; ?>"

Similar Messages

  • Can I use math functions in a PDF?

    I've got a document where scores are entered (1 - 5) in numeric fields. Is there a way to add these and average them, and output that value into another field on the fly, or by pressing a button on the form?

    you can also do it in formcalc.
    For adding use the sum() function.
    For averages use the Avg() function.
    You could put the formula in the calculate event of the field you want the results to show in and it would appear as soon as the initial numers are entered, or if you want to use a button you could put the formula in the click event of the button.

  • Using advanced math functions in plugins

    I have an application built in LabVIEW 8.5 that calls external VIs as PlugIns. Normally adding any subVIs of these PlugIns in the same directory as the plugin is located in (or a sub-directory of that) will enable the plugin to execute (I have several such plugins that do run properly).
    The problem now however is that one of these PlugIns use a few math functions (linear fit etc.) and, although all the subVIs and dlls (including the ones from the vi.lib etc.) are located in the same directory - and the application is run on a machine that actually has the full professional LV 8.5 installed on it, it is still not executable (I've built a source distribution to get all the code it depends on out, with no exclusions). If I hit the broken run-button it says the full development system is required to resolve the issue.
    The same plugin works fine in LV 7.1.1 (although then it is distributed as a top level VI in an llb with the support-VIs in it instead).
    Is there still a way in LV 8.5 to distribute a plugin that uses the math functions without having to include the functions in the built application that will launch the plugin?
    MTO

    Hi, Mads,
    My "Quick and Dirty" test shows that it should be no any problems. Just deselect "Exclude vi.lib" Vis in the Distribution, and select that dependecies should be deployed with PlugIn. See attachment, hopefully its will be helpful for you. Such distribution way produced huge llb (because not only linear fit embedded into library, but all math library), but at least it works.
    best regards,
    Andrey.
    Attachments:
    PlugInWithMathDistributionTest.zip ‏21 KB

  • How do I use sqrt() and pow() math functions?

    I tried starting with import java.lang.Math.*; and using sqrt() and pow(), but I get an error response in compilation.
    //** 1/pi calculation program using Ramanujan's forumula **//
    //** by n=2 iteration, double precision value for 1/pi repeats **//
    import java.lang.Math.*;
    import java.io.*;
    public class CalcInversePiRamanujan {
      public static void main(String args[]) {
        double n=0, term, four_n_factorial=1, n_factorial=1, inverse_pi=0;
        inverse_pi = four_n_factorial * 1103 * 2 * sqrt(2) / 9801; //** initial value for n=0 **//
        System.out.println(inverse_pi);
        for (n=1, four_n_factorial=1, n_factorial=1; n<=3; n++) {
            four_n_factorial *= (4 * n);
            four_n_factorial *= (4*n-1);
            four_n_factorial *= (4*n-2);
            four_n_factorial *= (4*n-3);
            term = four_n_factorial;
            n_factorial *= n;
            term /= pow(n_factorial, 4);
            term *= 1103 + 26390 * n;
            term /= pow(396, 4 * n);
            term *= 2 * sqrt(2);
            term /= 9801;
            inverse_pi += term;
            System.out.println(n, term, inverse_pi);
        System.exit(0);
    }

    all methods in math class are static so you have to call them as
    Math.pow() and Math.sqrt() you dont have to import any additional packages as Math is a class available in java.lang package
    you have to change your
    System.out.println(n, term, inverse_pi); to
    System.out.println(n+ term+ inverse_pi);
    math class also provides the value of Pi you can access it using Math.PI

  • How to use mathematical functions in XSL mapping

    Hi,
    I am using Jdeveloper 10.1.3.3. I need to insert mathematical functions like "multiply,divide,power" etc in my mapping. But in the XSL i am getting all string functions and very few math functions for number.
    I am newbie in Jdev. Please if anyone can share how this can be done.
    Thanks

    Hi,
    The RfcAdapter trys to find a Sender Agreement for this RFC call but the lookup failes. The values used for this lookup are:
    Sender Party/Sender Service: The values from Party and Service belonging to the sender channel.
    Sender Interface: The name of the RFC function module.
    Sender Namespace: The fix RFC namespace urn:sap-com:document:sap:rfc:functions
    Receiver Party/Receiver Service: These fields are empty. This will match the wildcard
    Regards,
    Suryanarayana

  • How to invoke math functions from dbx?

    Is there an easy way to invoke math functions from dbx? If I try, for example, to call sqrt I get meaningless results:
    (dbx) print sqrt(4.0)
    sqrt(4) = 1074790400
    (dbx)
    This is from code which uses sqrt, so sqrt should be accessible. Does this need some kind of cast?

    It turns out that this is a bit different than it looks: dbx is indeed able to invoke functions invoked in this way correctly; dbx just fails to print a sensible return value.
    I tried with the following small function:
    #include <stdio.h>
    int printme(double x) {
    printf("This is %g\n",x);
    return (int)2*x;
    Compiling this without -g, linking this with some hello world program and invoking the function from dbx gives
    (dbx) print ((int (*)(double))printme)(4.0)
    This is 4
    ((int (*)(double)) printme)(4) = &(noname)(double) at 0x8
    (dbx)
    The line "This is 4" clearly indicates that the function has been invoked correctly. Just the printed return value is meaningless. In this case, it is even possible to construct expressions with the return value:
    (dbx) print 5 + ((int (*)(double))printme)(4.0)
    This is 4
    5+((int (*)(double)) printme)(4) = 13
    i.e. dbx "knows" the correct return value 8. This does, however, apparently not work with return values of type double (i.e. in the original sqrt-Example).
    I have therefore submitted a bug report with bugs.sun.com; I will post the BugID when (and if) this has been accepted.

  • Using financial functions like xirr,irr,npv

    Hi Guys!,
    I would like to make use of financial functions like xirr,irr,npv using oracle/forms/sql , is there any resource available in oracle product family, if no how can i use there functions using oracle products.
    Thanks in advance
    Uday

    I'm unsure which Oracle product might include built-in financial functions -- perhaps one their Business Intelligence products? If your math and Java skills are up to the task, you might consider writing a JavaBean that contains your own implementations of the financial functions you require.
    Eric Adamson
    Lansing, Michigan

  • What advantage does HiQ provide over LabView Math Functions

    I'm evaluating how HiQ can help me to solve engineering modeling problems. I have used LabView to write several DAQ programs and a few programs to numerically solve modeling and simulation problems. What advantage are there to using HiQ compared to the math functions provided in LabView.

    There aren't really any advantages. There are some visualization options that are available in HiQ that would be very difficult in LabVIEW. HiQ is just another option to use, for a different type of interface and programming than is available in LabVIEW.
    Best Regards,
    Chris Matthews
    National Instruments

  • Math functions for dates

    Hello,
    Have you ever used a math function for dates (MMDDYYYY) not just a number? I'm looking to send an email out based on date field. For example, if someone's contract expires on 1/1/2016, I'd like to send them out emails 30, 152, 212 and 335 days before that date. Right now, we have fields set up for those 30, 152, 212 and 335 days and would like to know if there's a math function that would automatically fill them in dynamically based on their contract exp. date.
    Thanks for your help and suggestions.

    rmabrey wrote:
    I have the calculator working but I am having trouble figuring out thow to do a square root function, nth factorial, absolute value, and Fibonacci. java.lang.Math.sqrt()
    nothing for factorial - write your own.
    java.lang.Math.abs()
    nothing for Fibonacci - write your own.
    %

  • C99 math functions

    Hello all yet again,
    I'm trying to use the C99 math functions: nearbyint, round, exp2, cbrt, etc... But they don't seem to be defined in the CVI2013 header file.
    I previously would compile them (with gcc) only if __STDC_HOSTED__ was defined, but it appears that, although it doesn't appear in the predefined options listed in the build options, this macro is now defined in CVI2013...
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Note, the official test seems to be:
    #if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    // C99 math functions present
    #endif
    Solved!
    Go to Solution.

    gdargaud wrote:
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Nobody said so..., see here

  • TestStand math functions completely explained

    Is there a reference that has complete explanations to math functions used in TestStand?
    Many functions have options that are not explained under help.
    BenH

    Hi BenH,
    Just to make sure I am on the same page as you, are you referring to the Operators/Functions found in the expression browser or something within the API? Most of the math type functions within the expression browser have their operations and parameters explained within the Description box. I am not quite sure what other options you are seeing. Could you give some examples of some of the Math functions you have questions about and the options that are not defined?
    Regards,
    James W.
    Applications Engineer
    National Instruments

  • Math functions with error in/out

    Please refer to the attached picture. Where do you get these math functions with the error in/out? I saw these in responding to a post.
    Richard
    Solved!
    Go to Solution.
    Attachments:
    them_things.jpg ‏2 KB

    No wonder I've never seen it, I never use the waveform datatype. Thanks Lynn and Smerc.
    Richard

  • Math Functions in SAP

    What are the math functions in SAP?

    Hi,
    This is what u want may be
    Mathematical Functions
    ABAP contains a range of built-in functions that you can use as mathematical expressions, or as part of a mathematical expression:
    [COMPUTE] <n> = <func>( <m> ).
    The blanks between the parentheses and the argument <m> are obligatory. The result of calling the function <func> with the argument <m> is assigned to <n>.
    Functions for all Numeric Data Types
    The following built-in functions work with all three numeric data types (F, I, and P) as arguments.
    Functions for all numeric data types
    Function
    Result
    ABS
    Absolute value of argument.
    SIGN
    Sign of argument:                      1 X > 0
                                                  SIGN( X) = 0 if X = 0
                                                                   -1 X < 0
    CEIL
    Smallest integer value not smaller than the argument.
    FLOOR
    Largest integer value not larger than the argument.
    TRUNC
    Integer part of argument.
    FRAC
    Fraction part of argument.
    The argument of these functions does not have to be a numeric data type. If you choose another type, it is converted to a numeric type. For performance reasons, however, you should use the correct type whenever possible. The functions itself do not have a data type of their own. They do not change the numerical precision of a numerical operation.
    DATA N TYPE P DECIMALS 2.
    DATA M TYPE P DECIMALS 2 VALUE '-5.55'.
    N = ABS( M ).   WRITE:   'ABS:  ', N.
    N = SIGN( M ).  WRITE: / 'SIGN: ', N.
    N = CEIL( M ).  WRITE: / 'CEIL: ', N.
    N = FLOOR( M ). WRITE: / 'FLOOR:', N.
    N = TRUNC( M ). WRITE: / 'TRUNC:', N.
    N = FRAC( M ).  WRITE: / 'FRAC: ', N.
    The output appears as follows:
    ABS:              5.55
    SIGN:             1.00-
    CEIL:             5.00-
    FLOOR:            6.00-
    TRUNC:            5.00-
    FRAC:             0.55-
    DATA: T1(10),
    T2(10) VALUE '-100'.
    T1 = ABS( T2 ).
    WRITE T1.
    This produces the following output:
    100
    Two conversions are performed. First, the contents of field T2 (type C) are converted to type P. Then the system processes the ABS function using the results of the conversion. Then, during the assignment to the type C field T1, the result of the function is converted back to type C.
    Floating-Point Functions
    The following built-in functions work with floating point numbers (data type F) as an argument.
    Functions for floating point data types
    Function
    Meaning
    ACOS, ASIN, ATAN; COS, SIN, TAN
    Trigonometric functions.
    COSH, SINH, TANH
    Hyperbolic functions.
    EXP
    Exponential function with base e (e=2.7182818285).
    LOG
    Natural logarithm with base e.
    LOG10
    Logarithm with base 10.
    SQRT
    Square root.
    For all functions, the normal mathematical constraints apply (for example, square root is only possible for positive numbers). If you fail to observe them, a runtime error occurs.
    The argument of these functions does not have to be a floating point field. If you choose another type, it is converted to type F. The functions themselves have the data type F. This can change the numerical precision of a numerical operation.
    Regards

  • Math functions not sure how to work with them

    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);Especially I'm not sure how to format the sin and cos functions
    Thanks !

    jordan755 wrote:
    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);
    Java != algebra.
    (a) says: Take the variable called 'ax', perform a bitwise XOR on its value with the number 2, add that result to the value of the variable 'bc', add that result to the variable 'c' and put the result in variable 'y'.
    (b) is trying to call sin() and cos() methods defined in the current class and add the to variable cx.
    In your other thread, you had variable names 'keyboard' and 'character'. Given that, why would you expect 'bc' to mean "b times c" rather than "variable named 'bc'"? If you want multiplication, you have to use the multiply operator, ***.
    If you want to call a method that's defined outside your current class, you have to use the class name or a reference to an object of that class. The methods sin and cos are defined in the Math class. I advise you to read their docs before using them.

  • Using Math.floor

    When I use Math.floor I get an integer part of a double rigth?
    For exemple >> If I have
    double num = 34.54
    Math.floor(num) will return 34 rigth?
    But this 34 is a double 34.0 or is an integer 34?
    If not an integer, how can I do to get the integer part "34" like a integer number 34 and not like a double 34.0?

    Yes I already did it but it is not working
    Here is the code
    private void confirm(Double list[]){
            int nParcelas = (int)(list[2]);.....
    I call the function confirm from another class, and I pass a list like parameter.
    I have the same fuction but is a list of String and work ok. I get the numbers of this list and make some operations and averything works find...
    But I want to get an item of this list and get its integer part, and it it's not working....

Maybe you are looking for

  • Report on workflows created by user

    Hi there, What is the easiest way to find all workflows created by a particular user? I can't seem to find any SAP standard reports to do this - SWIA does not have selection criteria for CREATOR. I know I can run SWIA for a wide date range and then f

  • Exchange rate maintaining program/Euro Customizing

    Hi, Can any on eplease guide me how can I maintain exchane rates with any program.Are there any available ? DO I need to maintain exchange rates like following USD to AED and AED to USD with direct quote AT times I get green error Eueo customizing no

  • Notebook Taking a very long time to power off

    Hi All, My notebook (HP ENVY 17-j005tx Notebook) when shutting down only takes a couple of seconds, however it can take upto 5 minutes to power off... At first i thought some service or program was taking a long time to shutdown, I installed Windows

  • Error Return in bapi 'BAPI_CASE_CHANGE'

    Hello Im getting error Internal error: class CL_SCMG_CASE_API; method SAVE in Bapi "BAPI_CASE_CHANGE" to update the tables ? I have check the lock also but there is not locking in 'SE12' What to do ?

  • Calling an operation of a exposed Application Service fails

    Hi, I have created two applications A & B. Application A has a business operation1 and a application service1. Application service1 calls some operations on the Business Object1 and is also exposed as a web service. In application B, I have consumed